18 #ifndef _HOSTTRANSCEIVER_H_
19 #define _HOSTTRANSCEIVER_H_
41 #include "EOhostTransceiver.h"
46 #include "EoProtocol.h"
50 #include <yarp/os/Searchable.h>
61 class AbstractEthResource;
66 enum { maxSizeOfRXpacket = 1496 };
67 enum { defMaxSizeOfROP = 256, defMaxSizeOfTXpacket = 768};
75 bool init2(
AbstractEthResource *owner, yarp::os::Searchable &cfgtotal, eOipv4addressing_t& localIPaddressing, eOipv4addr_t remoteIP, uint16_t rxpktsize = maxSizeOfRXpacket);
79 bool isEPsupported(
const eOprot_endpoint_t ep);
80 bool isID32supported(
const eOprotID32_t id32);
83 bool read(
const eOprotID32_t id32,
void *
data);
86 bool write(
const eOprotID32_t id32,
const void*
data,
bool forcewriteOfReadOnly);
89 bool addROPset(
const eOprotID32_t id32,
const void*
data,
const uint32_t signature = eo_rop_SIGNATUREdummy);
92 bool addROPask(
const eOprotID32_t id32,
const uint32_t signature = eo_rop_SIGNATUREdummy);
98 bool parseUDP(
const void *
data,
const uint16_t size);
102 const void * getUDP(
size_t &size, uint16_t &numofrops);
109 eOipv4addr_t getIPv4();
113 eOprotBRD_t protboardnumber;
114 EOhostTransceiver *hosttxrx;
115 EOtransceiver *pc104txrx;
116 eOhosttransceiver_cfg_t hosttxrxcfg;
118 eOipv4addr_t localipaddr;
119 eOipv4addr_t remoteipaddr;
120 char remoteipstring[20];
124 uint16_t capacityofTXpacket;
125 uint16_t maxSizeOfROP;
126 eOnvset_BRDcfg_t nvsetbrdconfig;
131 enum { maxNumberOfROPloadingAttempts = 5 };
132 double delayAfterROPloadingFailure;
139 EOnv* getnvhandler(eOprotID32_t id32, EOnv* nv);
141 eOprotBRD_t get_protBRDnumber(
void);
143 bool lock_transceiver(
bool on);
147 bool lock_nvs(
bool on);
151 bool addSetROP__(
const eOprotID32_t id32,
const void*
data,
const uint32_t signature,
bool writelocalrxcache =
false);
156 void eoprot_override_mn(
void);
157 void eoprot_override_mc(
void);
158 void eoprot_override_as(
void);
159 void eoprot_override_sk(
void);
161 bool prepareTransceiverConfig2(yarp::os::Searchable &cfgtotal);
165 bool getNVvalue(EOnv *nv, uint8_t*
data, uint16_t* size);
168 eOipv4addr_t get_remoteIPaddress(
void);
bool getapplconfig(eOmn_appl_config_t &txcfg)
AbstractEthResource * getOwner()
bool read(yarp::os::Searchable &cfgtotal, pc104Data &pc104data)
bool write(const std::string filename, const FullRegulation ®)