/* * P60DockTestTask.h * * Created on: 18.11.2020 * Author: Jakob Meier */ #ifndef TEST_TESTTASKS_P60DOCKTESTTASK_H_ #define TEST_TESTTASKS_P60DOCKTESTTASK_H_ #include #include #include #include #include #include #include class P60DockTestTask: public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF { public: P60DockTestTask(object_id_t objectId_); virtual ~P60DockTestTask(); virtual ReturnValue_t performOperation(uint8_t operationCode = 0); private: /* Interface struct for csp protocol stack */ csp_iface_t csp_if; /* CSP address of P60 dock */ uint8_t p60dockAddress = 4; /* Client CSP address */ uint8_t cspClientAddress = 1; /* CAN interface used by CSP */ const char* canIf = "can0"; int bitrate = 1000; // bitrate of can int promisc = 0; // set to 0 to enable filter mode /* P60 Dock houskeeping parameters will be stored in this buffer */ uint8_t hkMem[P60DOCK_HK_SIZE]; gs_param_table_instance_t node_hk; /* Port of CSP ping requests on P60 dock */ uint8_t CSP_PING = 1; /* Sends ping request and receives ping reply */ ReturnValue_t pingP60dock(void); ReturnValue_t initializeCSPStack(void); /* Temperature and raw battery voltage are read from the P60 dock by this * function */ ReturnValue_t getParameters(void); }; #endif /* TEST_TESTTASKS_P60DOCKTESTTASK_H_ */