14#define HOSTTRANSCEIVER_USE_INTERNAL_MUTEXES
17#undef HOSTTRANSCEIVER_EmptyROPframesAreTransmitted
34#include "EOYtheSystem.h"
35#include "EOtheErrorManager.h"
40#include "EoProtocol.h"
49#include "EoProtocol.h"
50#include "EoProtocolMN.h"
51#include "EoProtocolMC.h"
52#include "EoProtocolAS.h"
53#include "EoProtocolSK.h"
56#include <yarp/os/LogStream.h>
58#include <yarp/os/Time.h>
62bool HostTransceiver::lock_transceiver(
bool on)
64#if !defined(HOSTTRANSCEIVER_USE_INTERNAL_MUTEXES)
76bool HostTransceiver::lock_nvs(
bool on)
78#if !defined(HOSTTRANSCEIVER_USE_INTERNAL_MUTEXES)
98 eo_common_ipv4addr_to_string(remoteipaddr, remoteipstring,
sizeof(remoteipstring));
101 protboardnumber = eo_prot_BRDdummy;
106 memcpy(&hosttxrxcfg, &eo_hosttransceiver_cfg_default,
sizeof(eOhosttransceiver_cfg_t));
119 eo_packet_Delete(p_RxPkt);
124 eo_hosttransceiver_Delete(hosttxrx);
141 yError() <<
"HostTransceiver::init(): called but ... its EOhostTransceiver is already created";
147 yError() <<
"HostTransceiver::init2(): called w/ nullptr";
156 eo_common_ipv4addr_to_decimal(remoteIP, NULL, NULL, NULL, &ip4);
157 protboardnumber = ip4;
158 localipaddr = localIPaddressing.addr;
159 remoteipaddr = remoteIP;
160 eo_common_ipv4addr_to_string(remoteipaddr, remoteipstring,
sizeof(remoteipstring));
161 ipport = localIPaddressing.port;
162 pktsizerx = rxpktsize;
165 if(
false == initProtocol())
167 yError() <<
"HostTransceiver::init() -> HostTransceiver::initProtocol() fails";
172 if(eobool_false == eoprot_board_can_be_managed(protboardnumber))
174 yError() <<
"HostTransceiver::init() -> the BOARD w/ IP " << remoteipstring <<
"cannot be managed by EOprotocol";
180 if(!prepareTransceiverConfig2(cfgtotal))
182 yError() <<
"HostTransceiver::init() -> HostTransceiver::prepareTransceiverConfig2() fails";
189 hosttxrx = eo_hosttransceiver_New(&hosttxrxcfg);
192 yError() <<
"HostTransceiver::init(): .... eo_hosttransceiver_New() failed";
197 pc104txrx = eo_hosttransceiver_GetTransceiver(hosttxrx);
198 if(pc104txrx == NULL)
204 nvset = eo_hosttransceiver_GetNVset(hosttxrx);
213 p_RxPkt = eo_packet_New(rxpktsize);
236 eOresult_t eores = eores_NOK_generic;
238 if(eobool_false == eoprot_id_isvalid(protboardnumber, id32))
241 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
242 yError() <<
"HostTransceiver::write() called w/ invalid id on BOARD /w IP" << remoteipstring <<
243 "with id: " << nvinfo;
249 yError() <<
"HostTransceiver::write() called w/ with NULL data";
257 nv_ptr = getnvhandler(id32, &nv);
261 yError() <<
"HostTransceiver::write(): Unable to get pointer to desired NV with id32" << id32;
267 eores = eo_nv_Set(&nv,
data, forcewriteOfReadOnly, eo_nv_upd_dontdo);
272 if(eores_OK != eores)
274 bool ROvariable = (eo_nv_rwmode_RO == eo_nv_GetRWmode(&nv)) ?
true :
false;
276 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
277 yError() <<
"HostTransceiver::write(): eo_nv_Set() has failed for IP" << remoteipstring <<
"and" << nvinfo <<
"RO mode = " << ((ROvariable) ?
"true." :
"false.");
279 if((eobool_false == forcewriteOfReadOnly) && (
true == ROvariable))
281 yError() <<
"HostTransceiver::write(): called with forcewriteOfReadOnly = false for a READ ONLY variable";
292bool HostTransceiver::addSetROP__(
const eOprotID32_t id32,
const void*
data,
const uint32_t signature,
bool writelocalrxcache)
294 eOresult_t eores = eores_NOK_generic;
300 if(eobool_false == eoprot_id_isvalid(protboardnumber, id32))
303 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
304 yError() <<
"HostTransceiver::addSetROP__() called w/ invalid id on BOARD /w IP" << remoteipstring <<
305 "with id: " << nvinfo;
311 yError() <<
"HostTransceiver::addSetROP__() called w/ with NULL data";
315 if(
true == writelocalrxcache)
320 nv_ptr = getnvhandler(id32, &nv);
324 yError() <<
"HostTransceiver::addSetROP__(): Unable to get pointer to desired NV with id32" << id32;
329 eores = eo_nv_Set(&nv,
data, eobool_false, eo_nv_upd_dontdo);
334 if(eores_OK != eores)
337 yError() <<
"HostTransceiver::addSetROP__(): Maybe you are trying to write a read-only variable? (eo_nv_Set failed)";
343 eOropdescriptor_t ropdesc = {0};
346 memcpy(&ropdesc, &eok_ropdesc_basic,
sizeof(eOropdescriptor_t));
348 ropdesc.control.plustime = 1;
349 ropdesc.control.plussign = (eo_rop_SIGNATUREdummy == signature) ? 0 : 1;
350 ropdesc.ropcode = eo_ropcode_set;
353 ropdesc.data =
reinterpret_cast<uint8_t *
>(
const_cast<void*
>(
data));
354 ropdesc.signature = signature;
358 for(
int i=0; ( (i<maxNumberOfROPloadingAttempts) && (!ret) ); i++)
360 lock_transceiver(
true);
361 eores = eo_transceiver_OccasionalROP_Load(pc104txrx, &ropdesc);
362 lock_transceiver(
false);
364 if(eores_OK != eores)
367 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
368 yWarning() <<
"HostTransceiver::addSetROP__(): eo_transceiver_OccasionalROP_Load() for BOARD /w IP" << remoteipstring <<
"unsuccessful at attempt num " << i+1 <<
369 "with id: " << nvinfo;
371 eo_transceiver_lasterror_tx_Get(pc104txrx, &err, &info0, &info1, &info2);
372 yWarning() <<
"HostTransceiver::addSetROP__(): eo_transceiver_lasterror_tx_Get() detected: err=" << err <<
"infos = " << info0 << info1 << info2;
374 yarp::os::Time::delay(delayAfterROPloadingFailure);
381 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
382 yDebug() <<
"HostTransceiver::addSetROP__(): eo_transceiver_OccasionalROP_Load() for BOARD /w IP" << remoteipstring <<
"successful ONLY at attempt num " << i+1 <<
383 "with id: " << nvinfo;
392 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
393 yError() <<
"HostTransceiver::addSetROP__(): ERROR in eo_transceiver_OccasionalROP_Load() for BOARD w/ IP" << remoteipstring+1 <<
"after all attempts" <<
394 "with id: " << nvinfo;
404 return(HostTransceiver::addSetROP__(id32,
data, signature,
false));
410 return (eobool_false == eoprot_id_isvalid(protboardnumber, id32)) ? false :
true;
415 eOresult_t eores = eores_NOK_generic;
421 if(eobool_false == eoprot_id_isvalid(protboardnumber, id32))
424 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
425 yError() <<
"HostTransceiver::addROPask() called w/ invalid protid: BOARD w/ IP" << remoteipstring <<
426 "with id: " << nvinfo;
430 eOropdescriptor_t ropdesc = {0};
432 memcpy(&ropdesc, &eok_ropdesc_basic,
sizeof(eOropdescriptor_t));
433 ropdesc.control.plustime = 1;
434 ropdesc.control.plussign = (eo_rop_SIGNATUREdummy == signature) ? 0 : 1;
435 ropdesc.ropcode = eo_ropcode_ask;
439 ropdesc.signature = signature;
444 for(
int i=0; ( (i<maxNumberOfROPloadingAttempts) && (!ret) ); i++)
446 lock_transceiver(
true);
447 eores = eo_transceiver_OccasionalROP_Load(pc104txrx, &ropdesc);
448 lock_transceiver(
false);
450 if(eores_OK != eores)
453 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
454 yWarning() <<
"HostTransceiver::addROPask(): eo_transceiver_OccasionalROP_Load() for BOARD w/ IP" << remoteipstring<<
"unsuccessfull at attempt num " << i+1 <<
455 "with id: " << nvinfo;
457 eo_transceiver_lasterror_tx_Get(pc104txrx, &err, &info0, &info1, &info2);
458 yWarning() <<
"HostTransceiver::addROPask(): eo_transceiver_lasterror_tx_Get() detected: err=" << err <<
"infos = " << info0 << info1 << info2;
460 yarp::os::Time::delay(delayAfterROPloadingFailure);
467 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
468 yDebug() <<
"HostTransceiver::addROPask(): eo_transceiver_OccasionalROP_Load() for BOARD /w IP" << remoteipstring <<
"succesful ONLY at attempt num " << i+1 <<
469 "with id: " << nvinfo;
478 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
479 yError() <<
"HostTransceiver::addROPask(): ERROR in eo_transceiver_OccasionalROP_Load() for BOARD w/ IP" << remoteipstring <<
"after all attempts " <<
480 "with id: " << nvinfo;
490 if(eobool_false == eoprot_id_isvalid(protboardnumber, id32))
493 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
494 yError() <<
"HostTransceiver::read() called w/ invalid protid: BOARD w/ IP" << remoteipstring <<
495 "with id: " << nvinfo;
501 yError() <<
"HostTransceiver:read() called w/ NULL data";
506 EOnv *nv_ptr = getnvhandler(id32, &nv);
511 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
512 yError() <<
"HostTransceiver::read() Unable to get pointer to desired NV with: " << nvinfo;
518 bool ret = getNVvalue(nv_ptr,
reinterpret_cast<uint8_t *
>(
data), &size);
531 yError() <<
"eo HostTransceiver::parse() called with NULL data";
537 yError() <<
"eo HostTransceiver::parse() called too big a packet: max size is" << pktsizerx;
543 uint16_t capacityrxpkt = 0;
545 eo_packet_Capacity_Get(p_RxPkt, &capacityrxpkt);
546 if(size > capacityrxpkt)
548 yError () <<
"received packet has size " << size <<
"which is higher than capacity of rx pkt = " << capacityrxpkt <<
"\n";
552 eo_packet_Payload_Set(p_RxPkt,
reinterpret_cast<uint8_t*
>(
const_cast<void*
>(
data)), size);
553 eo_packet_Addressing_Set(p_RxPkt, remoteipaddr, ipport);
564 eo_transceiver_Receive(pc104txrx, p_RxPkt, &numofrops, &
txtime);
572 if(eobool_true == eoprot_endpoint_configured_is(get_protBRDnumber(), ep))
583 const void * udpframe =
nullptr;
591 EOpacket* ptrpkt = NULL;
592 uint8_t *
data = NULL;
596#if !defined(HOSTTRANSCEIVER_EmptyROPframesAreTransmitted)
599 uint16_t numofoccasionals = 0;
600 lock_transceiver(
true);
601 eo_transceiver_NumberofOutROPs(pc104txrx, NULL, &numofoccasionals, NULL);
602 lock_transceiver(
false);
603 if(0 == numofoccasionals)
610 uint16_t tmpnumofrops = 0;
613 lock_transceiver(
true);
614 res = eo_transceiver_outpacket_Prepare(pc104txrx, &tmpnumofrops, NULL);
615 lock_transceiver(
false);
617#if defined(HOSTTRANSCEIVER_EmptyROPframesAreTransmitted)
618 if((eores_OK != res))
620 if((eores_OK != res) || (0 == tmpnumofrops))
627 res = eo_transceiver_outpacket_Get(pc104txrx, &ptrpkt);
635 uint16_t tmpsize = 0;
636 eo_packet_Payload_Get(ptrpkt, &
data, &tmpsize);
639 numofrops = tmpnumofrops;
640 udpframe = (tmpnumofrops > 0) ?
data :
nullptr;
647EOnv* HostTransceiver::getnvhandler(eOprotID32_t id32, EOnv* nv)
650 res = eo_nvset_NV_Get(nvset, id32, nv);
654 eoprot_ID2information(id32, nvinfo,
sizeof(nvinfo));
655 yError() <<
"HostTransceiver::getnvhandler() called w/ invalid protid: BOARD w/ IP" << remoteipstring <<
656 "with id: " << nvinfo;
664bool HostTransceiver::getNVvalue(EOnv *nv, uint8_t*
data, uint16_t* size)
669 yError() <<
"HostTransceiver::getNVvalue() called w/ NULL nv value: BOARD w/ IP" << remoteipstring;
673 (eores_OK == eo_nv_Get(nv, eo_nv_strg_volatile,
data, size)) ? ret =
true : ret = false;
678 yError() <<
"HostTransceiver::getNVvalue() fails in eo_nv_Get(): BOARD w/ IP" << remoteipstring;
685eOprotBRD_t HostTransceiver::get_protBRDnumber(
void)
687 return(protboardnumber);
691eOipv4addr_t HostTransceiver::get_remoteIPaddress(
void)
693 return(remoteipaddr);
697bool HostTransceiver::initProtocol()
699 static bool alreadyinitted =
false;
709 if(eores_OK != eoprot_config_board_reserve(protboardnumber))
711 yError() <<
"HostTransceiver::initProtocol(): call to eoprot_config_board_reserve() fails.";
715 if(
false == alreadyinitted)
719 eoprot_override_mn();
720 eoprot_override_mc();
721 eoprot_override_as();
722 eoprot_override_sk();
725 alreadyinitted =
true;
738void HostTransceiver::eoprot_override_mn(
void)
743 static const eOprot_callbacks_endpoint_descriptor_t mn_callbacks_descriptor_endp =
745 EO_INIT(.endpoint) eoprot_endpoint_management,
746 EO_INIT(.raminitialise) NULL
749 static const eOprot_callbacks_variable_descriptor_t mn_callbacks_descriptors_vars[] =
752 EO_INIT(.endpoint) eoprot_endpoint_management,
753 EO_INIT(.entity) eoprot_entity_mn_info,
754 EO_INIT(.tag) eoprot_tag_mn_info_status,
759 EO_INIT(.endpoint) eoprot_endpoint_management,
760 EO_INIT(.entity) eoprot_entity_mn_info,
761 EO_INIT(.tag) eoprot_tag_mn_info_status_basic,
766 EO_INIT(.endpoint) eoprot_endpoint_management,
767 EO_INIT(.entity) eoprot_entity_mn_comm,
768 EO_INIT(.tag) eoprot_tag_mn_comm_cmmnds_command_replynumof,
773 EO_INIT(.endpoint) eoprot_endpoint_management,
774 EO_INIT(.entity) eoprot_entity_mn_comm,
775 EO_INIT(.tag) eoprot_tag_mn_comm_cmmnds_command_replyarray,
780 EO_INIT(.endpoint) eoprot_endpoint_management,
781 EO_INIT(.entity) eoprot_entity_mn_service,
782 EO_INIT(.tag) eoprot_tag_mn_service_status_commandresult,
800 int number =
sizeof(mn_callbacks_descriptors_vars)/
sizeof(mn_callbacks_descriptors_vars[0]);
801 for(
int i=0; i<number; i++)
803 eoprot_config_callbacks_variable_set(&mn_callbacks_descriptors_vars[i]);
809void HostTransceiver::eoprot_override_mc(
void)
814 static const eOprot_callbacks_endpoint_descriptor_t mc_callbacks_descriptor_endp =
816 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
817 EO_INIT(.raminitialise) NULL
820 static const eOprot_callbacks_variable_descriptor_t mc_callbacks_descriptors_vars[] =
824 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
825 EO_INIT(.entity) eoprot_entity_mc_joint,
826 EO_INIT(.tag) eoprot_tag_mc_joint_status,
831 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
832 EO_INIT(.entity) eoprot_entity_mc_joint,
833 EO_INIT(.tag) eoprot_tag_mc_joint_status_core,
838 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
839 EO_INIT(.entity) eoprot_entity_mc_joint,
840 EO_INIT(.tag) eoprot_tag_mc_joint_status_debug,
845 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
846 EO_INIT(.entity) eoprot_entity_mc_joint,
847 EO_INIT(.tag) eoprot_tag_mc_joint_status_addinfo_multienc,
852 EO_INIT(.endpoint) eoprot_endpoint_motioncontrol,
853 EO_INIT(.entity) eoprot_entity_mc_motor,
854 EO_INIT(.tag) eoprot_tag_mc_motor_status,
880 int number =
sizeof(mc_callbacks_descriptors_vars)/
sizeof(mc_callbacks_descriptors_vars[0]);
881 for(
int i=0; i<number; i++)
883 eoprot_config_callbacks_variable_set(&mc_callbacks_descriptors_vars[i]);
888void HostTransceiver::eoprot_override_as(
void)
893 static const eOprot_callbacks_endpoint_descriptor_t as_callbacks_descriptor_endp =
895 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
896 EO_INIT(.raminitialise) NULL
899 static const eOprot_callbacks_variable_descriptor_t as_callbacks_descriptors_vars[] =
903 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
904 EO_INIT(.entity) eoprot_entity_as_strain,
905 EO_INIT(.tag) eoprot_tag_as_strain_status_calibratedvalues,
910 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
911 EO_INIT(.entity) eoprot_entity_as_strain,
912 EO_INIT(.tag) eoprot_tag_as_strain_status_uncalibratedvalues,
918 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
919 EO_INIT(.entity) eoprot_entity_as_mais,
920 EO_INIT(.tag) eoprot_tag_as_mais_status_the15values,
926 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
927 EO_INIT(.entity) eoprot_entity_as_inertial3,
928 EO_INIT(.tag) eoprot_tag_as_inertial3_status,
933 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
934 EO_INIT(.entity) eoprot_entity_as_temperature,
935 EO_INIT(.tag) eoprot_tag_as_temperature_status,
940 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
941 EO_INIT(.entity) eoprot_entity_as_psc,
942 EO_INIT(.tag) eoprot_tag_as_psc_status,
947 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
948 EO_INIT(.entity) eoprot_entity_as_pos,
949 EO_INIT(.tag) eoprot_tag_as_pos_status,
954 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
955 EO_INIT(.entity) eoprot_entity_as_ft,
956 EO_INIT(.tag) eoprot_tag_as_ft_status_timedvalue,
961 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
962 EO_INIT(.entity) eoprot_entity_as_battery,
963 EO_INIT(.tag) eoprot_tag_as_battery_status_timedvalue,
970 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
971 EO_INIT(.entity) eoprot_entity_as_inertial,
972 EO_INIT(.tag) eoprot_tag_as_inertial_status_accelerometer,
974 EO_INIT(.update) eoprot_fun_UPDT_as_inertial_status_accelerometer
977 EO_INIT(.endpoint) eoprot_endpoint_analogsensors,
978 EO_INIT(.entity) eoprot_entity_as_inertial,
979 EO_INIT(.tag) eoprot_tag_as_inertial_status_gyroscope,
981 EO_INIT(.update) eoprot_fun_UPDT_as_inertial_status_gyroscope
999 int number =
sizeof(as_callbacks_descriptors_vars)/
sizeof(as_callbacks_descriptors_vars[0]);
1000 for(
int i=0; i<number; i++)
1002 eoprot_config_callbacks_variable_set(&as_callbacks_descriptors_vars[i]);
1008void HostTransceiver::eoprot_override_sk(
void)
1019 static const eOprot_callbacks_variable_descriptor_t sk_callbacks_descriptors_vars[] =
1023 EO_INIT(.endpoint) eoprot_endpoint_skin,
1024 EO_INIT(.entity) eoprot_entity_sk_skin,
1025 EO_INIT(.tag) eoprot_tag_sk_skin_status_arrayofcandata,
1026 EO_INIT(.init) NULL,
1044 int number =
sizeof(sk_callbacks_descriptors_vars)/
sizeof(sk_callbacks_descriptors_vars[0]);
1045 for(
int i=0; i<number; i++)
1047 eoprot_config_callbacks_variable_set(&sk_callbacks_descriptors_vars[i]);
1055 const eOreceiver_seqnum_error_t * err = eo_receiver_GetSequenceNumberError(r);
1056 long long unsigned int exp = err->exp_seqnum;
1057 long long unsigned int rec = err->rec_seqnum;
1058 long long unsigned int timeoftxofcurrent = err->timeoftxofcurrent;
1059 long long unsigned int timeoftxofprevious = err->timeoftxofprevious;
1060 char *ipaddr = (
char*)&err->remipv4addr;
1062 char errmsg[256] = {0};
1063 snprintf(errmsg,
sizeof(errmsg),
"hostTransceiver()::parse() detected an ERROR in sequence number from IP = %d.%d.%d.%d. Expected: %llu, Received: %llu, Missing: %llu, Prev Frame TX at %llu us, This Frame TX at %llu us",
1064 ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3],
1066 timeoftxofprevious, timeoftxofcurrent);
1083 const eOreceiver_invalidframe_error_t * err = eo_receiver_GetInvalidFrameError(r);
1084 char errmsg[256] = {0};
1085 char *ipaddr = (
char*)&err->remipv4addr;
1087 long long unsigned int ageofframe = header->
ageofframe;
1089 uint16_t ropframesize = 0;
1090 eo_ropframe_Size_Get(err->ropframe, &ropframesize);
1092 snprintf(errmsg,
sizeof(errmsg),
"hostTransceiver()::parse() detected an ERROR of type INVALID FRAME from IP = %d.%d.%d.%d", ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]);
1094 snprintf(errmsg,
sizeof(errmsg),
"hostTransceiver()::parse() detected: ropframesize = %d, ropsizeof = %d, ropsnumberof = %d, ageoframe = %llu, sequencenumber = %llu", ropframesize, header->
ropssizeof, header->
ropsnumberof, ageofframe, sequencenumber);
1100bool HostTransceiver::prepareTransceiverConfig2(yarp::os::Searchable &cfgtotal)
1102 memcpy(&hosttxrxcfg, &eo_hosttransceiver_cfg_default,
sizeof(eOhosttransceiver_cfg_t));
1103 hosttxrxcfg.remoteboardipv4addr = remoteipaddr;
1104 hosttxrxcfg.remoteboardipv4port = ipport;
1129 hosttxrxcfg.sizes.capacityoftxpacket = capacityofTXpacket;
1130 hosttxrxcfg.sizes.capacityofrop = maxSizeOfROP;
1131 hosttxrxcfg.sizes.capacityofropframeregulars = eo_ropframe_sizeforZEROrops;
1132 hosttxrxcfg.sizes.capacityofropframereplies = eo_ropframe_sizeforZEROrops;
1133 hosttxrxcfg.sizes.capacityofropframeoccasionals = (hosttxrxcfg.sizes.capacityoftxpacket - eo_ropframe_sizeforZEROrops) - hosttxrxcfg.sizes.capacityofropframeregulars - hosttxrxcfg.sizes.capacityofropframereplies;
1134 hosttxrxcfg.sizes.maxnumberofregularrops = 0;
1138 const eOnvset_BRDcfg_t* brdcf2use = &eonvset_BRDcfgMax;
1141 memcpy(&nvsetbrdconfig, brdcf2use,
sizeof(eOnvset_BRDcfg_t));
1142 nvsetbrdconfig.boardnum = get_protBRDnumber();
1144 hosttxrxcfg.nvsetbrdcfg = &nvsetbrdconfig;
1149#if !defined(HOSTTRANSCEIVER_USE_INTERNAL_MUTEXES)
1150 hosttxrxcfg.mutex_fn_new = NULL;
1151 hosttxrxcfg.transprotection = eo_trans_protection_none;
1152 hosttxrxcfg.nvsetprotection = eo_nvset_protection_none;
1155 hosttxrxcfg.mutex_fn_new = (eov_mutex_fn_mutexderived_new) eoy_mutex_New;
1156 hosttxrxcfg.transprotection = eo_trans_protection_enabled;
1157 hosttxrxcfg.nvsetprotection = eo_nvset_protection_one_per_endpoint;
void eoprot_fun_UPDT_as_strain_status_calibratedvalues(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_strain_status_uncalibratedvalues(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_ft_status_timedvalue(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_ONSAY_as(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_inertial3_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_pos_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_psc_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_temperature_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_mais_status_the15values(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_as_battery_status_timedvalue(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_ONSAY_mc(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mc_joint_status_core(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mc_joint_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mc_joint_status_debug(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mc_motor_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mc_joint_status_addinfo_multienc(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_ONSAY_mn(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mn_comm_cmmnds_command_replynumof(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mn_info_status_basic(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mn_comm_cmmnds_command_replyarray(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mn_service_status_commandresult(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_mn_info_status(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_UPDT_sk_skin_status_arrayofcandata(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_ONSAY_sk(const EOnv *nv, const eOropdescriptor_t *rd)
bool addROPask(const eOprotID32_t id32, const uint32_t signature=eo_rop_SIGNATUREdummy)
bool write(const eOprotID32_t id32, const void *data, bool forcewriteOfReadOnly)
bool addROPset(const eOprotID32_t id32, const void *data, const uint32_t signature=eo_rop_SIGNATUREdummy)
bool isEPsupported(const eOprot_endpoint_t ep)
bool init2(AbstractEthResource *owner, yarp::os::Searchable &cfgtotal, eOipv4addressing_t &localIPaddressing, eOipv4addr_t remoteIP, uint16_t rxpktsize=maxSizeOfRXpacket)
const void * getUDP(size_t &size, uint16_t &numofrops)
bool parseUDP(const void *data, const uint16_t size)
bool isID32supported(const eOprotID32_t id32)
AbstractEthResource * getResource()
bool read(const eOprotID32_t id32, void *data)
void cpp_protocol_callback_incaseoferror_invalidFrame(EOreceiver *r)
void cpp_protocol_callback_incaseoferror_in_sequencenumberReceived(EOreceiver *r)
bool read(yarp::os::Searchable &cfgtotal, pc104Data &pc104data)
boardProperties properties
std::uint16_t maxSizeRXpacket