wip CspComIF
This commit is contained in:
24
bsp_linux/comIF/cookies/CspCookie.cpp
Normal file
24
bsp_linux/comIF/cookies/CspCookie.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "CspCookie.h"
|
||||
|
||||
CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_) :
|
||||
maxReplyLength(maxReplyLength_), cspAddress(cspAddress_) {
|
||||
}
|
||||
|
||||
CspCookie::~CspCookie() {
|
||||
}
|
||||
|
||||
uint16_t CspCookie::getMaxReplyLength(){
|
||||
return maxReplyLength;
|
||||
}
|
||||
|
||||
uint8_t CspCookie::getCspAddress(){
|
||||
return cspAddress;
|
||||
}
|
||||
|
||||
char* CspCookie::getCanIf(){
|
||||
return canInterface;
|
||||
}
|
||||
|
||||
int CspCookie::getBitrate(){
|
||||
return bitrate;
|
||||
}
|
31
bsp_linux/comIF/cookies/CspCookie.h
Normal file
31
bsp_linux/comIF/cookies/CspCookie.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef BSP_LINUX_COMIF_COOKIES_CSPCOOKIE_H_
|
||||
#define BSP_LINUX_COMIF_COOKIES_CSPCOOKIE_H_
|
||||
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief This is the cookie for devices supporting the CSP (CubeSat Space
|
||||
* Protocol).
|
||||
* @author J. Meier
|
||||
*/
|
||||
class CspCookie: public CookieIF {
|
||||
public:
|
||||
|
||||
CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_);
|
||||
virtual ~CspCookie();
|
||||
|
||||
uint16_t getMaxReplyLength();
|
||||
uint8_t getCspAddress();
|
||||
char* getCanIf();
|
||||
int getBitrate();
|
||||
|
||||
private:
|
||||
|
||||
uint16_t maxReplyLength;
|
||||
char canInterface[5] = "can0";
|
||||
uint8_t cspAddress;
|
||||
int bitrate = 1000;
|
||||
};
|
||||
|
||||
#endif /* BSP_LINUX_COMIF_COOKIES_CSPCOOKIE_H_ */
|
Reference in New Issue
Block a user