#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_P60DOCKHANDLERDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_P60DOCKHANDLERDEFINITIONS_H_ /** * @brief This class helps to serialize and deserialze the P60 dock packet * holding information about the module configuration. The parameters * of this table are described in the gs-man-nanopower-p60-dock-2.2.9.pdf * on page 16. */ //class ModuleConfigTable : public SerialLinkedListAdapter { //!< [EXPORT] : [SUBSERVICE] 2 //public: // typedef char dataBufferType; // typedef uint8_t typeOfMaxData; // // ModuleConfigTable() { // setStart(&objectId); // objectId.setNext(&sizeOfRepositoryPath); // sizeOfRepositoryPath.setNext(&repositoryPath); // repositoryPath.setNext(&sizeOfFilename); // sizeOfFilename.setNext(&filename); // /* Add string terminator to filename and repository path */ // repositoryPath.entry.insert('\0'); // filename.entry.insert('\0'); // } // // uint32_t getSizeOfRepositoryPath() { // return sizeOfRepositoryPath; // } // // uint32_t getSizeOfFilename() { // return sizeOfFilename; // } // // uint8_t * getRepositoryPath() { // return repositoryPath.entry.front(); // } // // uint8_t getFilename() { // return filename.entry.front(); // } // //private: // /* Prevent object copying */ // ModuleConfigTable(const ModuleConfigTable &obj); // // SerializeElement> out_name; // SerializeElement> out_en; // SerializeElement> out_on_cnt; // SerializeElement> out_on_cnt; // SerializeElement sizeOfRepositoryPath; // SerializeElement> repositoryPath; // SerializeElement sizeOfFilename; // SerializeElement> filename; //}; /** * @brief A serial linked list adapter implementation of the gs_rparam_query_t struct * defined in rparam.h */ class GetParamCommand: public SerialLinkedListAdapter { //!< [EXPORT] : [SUBSERVICE] 130 public: typedef uint16_t typeOfMaxDataSize; static const uint16_t MAX_DATA_LENGTH = sizeof(typeOfMaxDataSize); GetParamCommand(uint8_t objectId_, ActionId_t actionId_, const uint8_t * replyDataBuffer_ = NULL, uint16_t replyDataSize_ = 0): objectId(objectId_), actionId(actionId_), replyData(replyDataBuffer_,replyDataSize_){ setLinks(); } private: GetParamCommand(const GetParamCommand &reply); void setLinks() { setStart(&action); action.setNext(&tableId); tableId.setNext(&length); lenght.setNext(&checksum); checksum.setNext(&seq); checksum.setNext(&addr); } SerializeElement cspPort = 7; SerializeElement action; SerializeElement tableId; SerializeElement length; SerializeElement checksum; SerializeElement seq; SerializeElement total; SerializeElement addr; }; #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_P60DOCKHANDLERDEFINITIONS_H_ */