/* * P60DockComIF.h * * Created on: 01.12.2020 * Author: jakob */ #ifndef BSP_LINUX_COMIF_P60DOCKCOMIF_H_ #define BSP_LINUX_COMIF_P60DOCKCOMIF_H_ #include #include #include #include #include #include #include #include /** * @brief This is the communication interface to the cubesat space protocol * stack. The physical layer used for this implementation is CAN. * @author Jakob Meier */ class P60DockComIF: public DeviceCommunicationIF, public SystemObject { public: static const uint8_t maxReplyLength = 188; P60DockComIF(object_id_t objectId); virtual ~P60DockComIF(); ReturnValue_t initializeInterface(CookieIF * cookie) override; ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t * sendData, size_t sendLen) override; ReturnValue_t getSendSuccess(CookieIF *cookie) override; ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override; ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **readData, size_t *readLen) override; private: /* Interface struct for csp protocol stack */ csp_iface_t csp_if; /* Table definitions. According to gomspace software documentation there * exist four tables each identified by a number*/ uint8_t boardConfigTableNum = 0; uint8_t moduleCfgTableNum = 1; uint8_t calibrationParamTableNum = 2; uint8_t tmTableNum = 4; unsigned int moduleConfigTableRows = 32; uint8_t moduleCfgTableSize = 188; uint8_t tmTableSize = 188; uint8_t replyBuffer[P60DockComIF::maxReplyLength]; }; #endif /* BSP_LINUX_COMIF_P60DOCKCOMIF_H_ */