Init commit
This commit is contained in:
38
common/stm32_nucleo/networking/UdpTcLwIpPollingTask.h
Normal file
38
common/stm32_nucleo/networking/UdpTcLwIpPollingTask.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef BSP_STM32_RTEMS_EMACPOLLINGTASK_H_
|
||||
#define BSP_STM32_RTEMS_EMACPOLLINGTASK_H_
|
||||
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
class TmTcLwIpUdpBridge;
|
||||
|
||||
/**
|
||||
* @brief Separate task to poll EMAC interface.
|
||||
* Polled data is passed to the netif (lwIP)
|
||||
*/
|
||||
class UdpTcLwIpPollingTask:
|
||||
public SystemObject,
|
||||
public ExecutableObjectIF,
|
||||
public HasReturnvaluesIF {
|
||||
public:
|
||||
UdpTcLwIpPollingTask(object_id_t objectId, object_id_t bridgeId);
|
||||
virtual ~UdpTcLwIpPollingTask();
|
||||
|
||||
virtual ReturnValue_t initialize() override;
|
||||
|
||||
/**
|
||||
* Executed periodically.
|
||||
* @param operationCode
|
||||
* @return
|
||||
*/
|
||||
virtual ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||
private:
|
||||
static const uint8_t PERIODIC_HANDLE_TRIGGER = 5;
|
||||
uint8_t periodicHandleCounter;
|
||||
object_id_t bridgeId = 0;
|
||||
TmTcLwIpUdpBridge* udpBridge = nullptr;
|
||||
};
|
||||
|
||||
|
||||
#endif /* BSP_STM32_RTEMS_EMACPOLLINGTASK_H_ */
|
Reference in New Issue
Block a user