2020-11-19 18:24:03 +01:00
|
|
|
/*
|
|
|
|
* P60DockTestTask.h
|
|
|
|
*
|
|
|
|
* Created on: 18.11.2020
|
2020-11-26 10:24:23 +01:00
|
|
|
* Author: Jakob Meier
|
2020-11-19 18:24:03 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TEST_TESTTASKS_P60DOCKTESTTASK_H_
|
|
|
|
#define TEST_TESTTASKS_P60DOCKTESTTASK_H_
|
|
|
|
|
2020-11-23 11:42:22 +01:00
|
|
|
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
|
|
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
|
|
|
#include <fsfw/objectmanager/SystemObject.h>
|
2020-11-26 10:24:23 +01:00
|
|
|
#include <p60dock.h>
|
2020-11-23 11:42:22 +01:00
|
|
|
|
2020-11-19 18:24:03 +01:00
|
|
|
extern "C" {
|
|
|
|
#include <csp/csp.h>
|
|
|
|
#include <csp/interfaces/csp_if_can.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-23 11:42:22 +01:00
|
|
|
class P60DockTestTask: public SystemObject,
|
|
|
|
public ExecutableObjectIF,
|
|
|
|
public HasReturnvaluesIF {
|
2020-11-19 18:24:03 +01:00
|
|
|
public:
|
2020-11-23 11:42:22 +01:00
|
|
|
P60DockTestTask(object_id_t objectId_);
|
2020-11-19 18:24:03 +01:00
|
|
|
virtual ~P60DockTestTask();
|
|
|
|
|
|
|
|
virtual ReturnValue_t performOperation(uint8_t operationCode = 0);
|
|
|
|
|
|
|
|
private:
|
|
|
|
/* Interface struct for csp protocol stack */
|
|
|
|
csp_iface_t csp_if;
|
2020-11-23 11:42:22 +01:00
|
|
|
uint8_t p60dockAddress = 4;
|
|
|
|
uint8_t CSP_PING = 1;
|
|
|
|
uint8_t cspAddress = 1;
|
|
|
|
const char* canIf = "can0";
|
|
|
|
int bitrate = 1000; // bitrate of can
|
|
|
|
int promisc = 0; // set to 0 to enable filter mode
|
2020-11-19 18:24:03 +01:00
|
|
|
|
2020-11-26 10:24:23 +01:00
|
|
|
uint8_t hk_mem[P60DOCK_HK_SIZE];
|
|
|
|
uint8_t p60dock_node = 4;
|
|
|
|
|
2020-11-19 18:24:03 +01:00
|
|
|
ReturnValue_t sendPacket(void);
|
2020-11-23 11:42:22 +01:00
|
|
|
ReturnValue_t initializeCSPStack(void);
|
2020-11-26 10:24:23 +01:00
|
|
|
ReturnValue_t getParameters(void);
|
2020-11-19 18:24:03 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* TEST_TESTTASKS_P60DOCKTESTTASK_H_ */
|