🎨 Doxygen pass complete
This commit is contained in:
parent
47dcb933d4
commit
fbaadb97f6
5 changed files with 83 additions and 32 deletions
|
|
@ -122,6 +122,16 @@ CheckinModel::getCheckinResponse() {
|
|||
return _response;
|
||||
};
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Gets the CheckinRequest message
|
||||
@returns CheckinRequest message.
|
||||
*/
|
||||
/***********************************************************************/
|
||||
wippersnapper_checkin_CheckinRequest *CheckinModel::getCheckinRequest() {
|
||||
return &_CheckinRequest;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Sets the CheckinResponse message's total GPIO pins field
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ public:
|
|||
void CreateCheckinRequest(const char *hardware_uid,
|
||||
const char *firmware_version);
|
||||
bool EncodeCheckinRequest();
|
||||
wippersnapper_checkin_CheckinRequest *getCheckinRequest() {
|
||||
return &_CheckinRequest;
|
||||
}
|
||||
wippersnapper_checkin_CheckinRequest* getCheckinRequest();
|
||||
// Response Message
|
||||
bool DecodeCheckinResponse(pb_istream_t *stream);
|
||||
void ParseCheckinResponse();
|
||||
|
|
|
|||
|
|
@ -20,14 +20,20 @@
|
|||
|
||||
class Wippersnapper_V2;
|
||||
|
||||
/**
|
||||
* @struct DigitalIOPin
|
||||
* @brief This struct represents a digital I/O pin.
|
||||
*/
|
||||
struct DigitalIOPin {
|
||||
uint8_t pin_name;
|
||||
wippersnapper_digitalio_DigitalIODirection pin_direction;
|
||||
wippersnapper_digitalio_DigitalIOSampleMode sample_mode;
|
||||
bool pin_value;
|
||||
bool prv_pin_value;
|
||||
ulong pin_period;
|
||||
ulong prv_pin_time;
|
||||
uint8_t pin_name; ///< The pin's name.
|
||||
wippersnapper_digitalio_DigitalIODirection
|
||||
pin_direction; ///< The pin's direction.
|
||||
wippersnapper_digitalio_DigitalIOSampleMode
|
||||
sample_mode; ///< The pin's sample mode.
|
||||
bool pin_value; ///< The pin's value.
|
||||
bool prv_pin_value; ///< The pin's previous value.
|
||||
ulong pin_period; ///< The pin's period.
|
||||
ulong prv_pin_time; ///< The pin's previous time.
|
||||
};
|
||||
|
||||
class DigitalIOModel; // Forward declaration
|
||||
|
|
@ -70,5 +76,5 @@ private:
|
|||
DigitalIOModel *_dio_model;
|
||||
DigitalIOHardware *_dio_hardware;
|
||||
};
|
||||
extern Wippersnapper_V2 WsV2;
|
||||
#endif // WS_DIGITALIO_CONTROLLER_H
|
||||
extern Wippersnapper_V2 WsV2; ///< Wippersnapper V2 instance
|
||||
#endif // WS_DIGITALIO_CONTROLLER_H
|
||||
|
|
@ -33,6 +33,46 @@ DigitalIOModel::DigitalIOModel() {
|
|||
/***********************************************************************/
|
||||
DigitalIOModel::~DigitalIOModel() {}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Parses a DigitalIOAdd message.
|
||||
@return DigitalIOAdd message object.
|
||||
*/
|
||||
/***********************************************************************/
|
||||
wippersnapper_digitalio_DigitalIOAdd *DigitalIOModel::GetDigitalIOAddMsg() {
|
||||
return &_msg_dio_add;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Gets a DigitalIORemove message.
|
||||
@return DigitalIORemove message object.
|
||||
*/
|
||||
/***********************************************************************/
|
||||
wippersnapper_digitalio_DigitalIORemove *DigitalIOModel::GetDigitalIORemove() {
|
||||
return &_msg_dio_remove;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Gets a DigitalIOWrite message.
|
||||
@return DigitalIOWrite message object.
|
||||
*/
|
||||
/***********************************************************************/
|
||||
wippersnapper_digitalio_DigitalIOWrite *DigitalIOModel::GetDigitalIOWriteMsg() {
|
||||
return &_msg_dio_write;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Gets a DigitalIOEvent message.
|
||||
@return DigitalIOEvent message object.
|
||||
*/
|
||||
/***********************************************************************/
|
||||
wippersnapper_digitalio_DigitalIOEvent *DigitalIOModel::GetDigitalIOEventMsg() {
|
||||
return &_msg_dio_event;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*!
|
||||
@brief Decodes a DigitalIOAdd message into the _msg_dio_add object
|
||||
|
|
|
|||
|
|
@ -26,29 +26,26 @@ class DigitalIOModel {
|
|||
public:
|
||||
DigitalIOModel();
|
||||
~DigitalIOModel();
|
||||
// DigitalIOAdd
|
||||
bool DecodeDigitalIOAdd(pb_istream_t *stream);
|
||||
void ParseDigitalIOAdd();
|
||||
wippersnapper_digitalio_DigitalIOAdd *GetDigitalIOAddMsg() {
|
||||
return &_msg_dio_add;
|
||||
}
|
||||
void ParseDigitalIORemove();
|
||||
wippersnapper_digitalio_DigitalIORemove *GetDigitalIORemove() {
|
||||
return &_msg_dio_remove;
|
||||
}
|
||||
|
||||
wippersnapper_digitalio_DigitalIOAdd *GetDigitalIOAddMsg();
|
||||
// DigitalIORemove
|
||||
wippersnapper_digitalio_DigitalIORemove *GetDigitalIORemove();
|
||||
// DigitalIOWrite
|
||||
bool DecodeDigitalIOWrite(pb_istream_t *stream);
|
||||
wippersnapper_digitalio_DigitalIOWrite *GetDigitalIOWriteMsg() {
|
||||
return &_msg_dio_write;
|
||||
}
|
||||
|
||||
wippersnapper_digitalio_DigitalIOWrite *GetDigitalIOWriteMsg();
|
||||
// DigitalIOEvent
|
||||
bool EncodeDigitalIOEvent(char *pin_name, bool value);
|
||||
wippersnapper_digitalio_DigitalIOEvent *GetDigitalIOEventMsg() {
|
||||
return &_msg_dio_event;
|
||||
}
|
||||
wippersnapper_digitalio_DigitalIOEvent *GetDigitalIOEventMsg();
|
||||
|
||||
private:
|
||||
wippersnapper_digitalio_DigitalIOAdd _msg_dio_add;
|
||||
wippersnapper_digitalio_DigitalIORemove _msg_dio_remove;
|
||||
wippersnapper_digitalio_DigitalIOEvent _msg_dio_event;
|
||||
wippersnapper_digitalio_DigitalIOWrite _msg_dio_write;
|
||||
wippersnapper_digitalio_DigitalIOAdd
|
||||
_msg_dio_add; ///< DigitalIOAdd message object
|
||||
wippersnapper_digitalio_DigitalIORemove
|
||||
_msg_dio_remove; ///< DigitalIORemove message object
|
||||
wippersnapper_digitalio_DigitalIOEvent
|
||||
_msg_dio_event; ///< DigitalIOEvent message object
|
||||
wippersnapper_digitalio_DigitalIOWrite
|
||||
_msg_dio_write; ///< DigitalIOWrite message object
|
||||
};
|
||||
#endif // WS_DIGITALIO_MODEL_H
|
||||
Loading…
Reference in a new issue