heater main switch commanding
This commit is contained in:
@ -394,7 +394,7 @@ class GomspaceSetParamMessage : public SerialLinkedListAdapter<SerializeIF> {
|
||||
public:
|
||||
|
||||
/* The size of the largest parameter */
|
||||
static const uint32_t MAX_SIZE = 4;
|
||||
static const uint8_t MAX_SIZE = 4;
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -404,11 +404,9 @@ public:
|
||||
* @param parameterSize The size of the parameter.
|
||||
*
|
||||
*/
|
||||
GomspaceSetParamMessage(uint16_t memoryAddress, const uint8_t** parameterValue,
|
||||
GomspaceSetParamMessage(uint16_t memoryAddress, const uint8_t* parameterValue,
|
||||
uint8_t parameterSize) :
|
||||
memoryAddress(memoryAddress) {
|
||||
size_t size = parameterSize;
|
||||
parameterValueInfo.deSerialize(parameterValue, &size, SerializeIF::Endianness::BIG);
|
||||
memoryAddress(memoryAddress), parameterValueBuffer(parameterValue, parameterSize, true) {
|
||||
setLinks();
|
||||
}
|
||||
|
||||
@ -416,10 +414,14 @@ private:
|
||||
GomspaceSetParamMessage(const GomspaceSetParamMessage &reply);
|
||||
void setLinks() {
|
||||
setStart(&memoryAddress);
|
||||
memoryAddress.setNext(¶meterValueInfo);
|
||||
memoryAddress.setNext(¶meterValueBuffer);
|
||||
}
|
||||
SerializeElement<uint16_t> memoryAddress;
|
||||
SerializeElement<SerialFixedArrayListAdapter<uint8_t, MAX_SIZE, uint8_t>> parameterValueInfo;
|
||||
/**
|
||||
* Parameter can be uint8_t, uint16_t or uint32_t. Thus max size of parameterValueBuffer is
|
||||
* four bytes.
|
||||
*/
|
||||
SerializeElement<SerialBufferAdapter<uint8_t>> parameterValueBuffer;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user