#ifndef BSP_LINUX_COMIF_COOKIES_P60DockCookie_H_ #define BSP_LINUX_COMIF_COOKIES_P60DockCookie_H_ #include typedef uint32_t MessageType_t; /** * @brief This is the cookie for the communication interface to the cubesat * space protocol (CSP) implementation of gomspace. The communication * interface uses CAN as the physical layer. Therefore the cookie also * holds the CAN instance to use. * @author Jakob Meier */ class P60DockCookie: public CookieIF { public: /** * Constructor for the CSP cookie * @param cspAddress_ The CSP address of the target device. */ P60DockCookie(uint8_t cspAddress_); virtual ~P60DockCookie(); uint8_t getCspAddress(); char* getCanIf(); int getBitrate(); void setPingMessage(); void setRebootMessage(); void setReadModuleCfgMessage(); MessageType_t getMessageType(); /* Message type defines the type of the next data transfer between the * CSP device and the OBC. */ static const MessageType_t MESSAGE_NONE = 0x0; static const MessageType_t PING = 0x1; static const MessageType_t REBOOT = 0x4; static const MessageType_t READ_MODULE_CONFIG = 0x71; private: char canInterface[5] = "can0"; uint8_t cspAddress; int bitrate = 1000; MessageType_t nextMessage = MESSAGE_NONE; }; #endif /* BSP_LINUX_COMIF_COOKIES_P60DockCookie_H_ */