diff --git a/MAC/APL/PIC/RSPDriver/src/CDOWrite.cc b/MAC/APL/PIC/RSPDriver/src/CDOWrite.cc index 49dbcff72fcc217671bbf2905177eb622aa985e5..b550867372fe56f9f65f755b551a5ab7c2aff0dc 100644 --- a/MAC/APL/PIC/RSPDriver/src/CDOWrite.cc +++ b/MAC/APL/PIC/RSPDriver/src/CDOWrite.cc @@ -136,6 +136,11 @@ uint16 CDOWrite::compute_ip_checksum(void* addr, int count) void CDOWrite::sendrequest() { + // write register (with same setting) every second if WRITE_CDO_ONCE == 0 + if (0 == GET_CONFIG("RSPDriver.WRITE_CDO_ONCE", i)) { + Cache::getInstance().getState().cdo().write(getBoardId()); + } + // skip update if the CDO settings have not been modified if (RTC::RegisterState::WRITE != Cache::getInstance().getState().cdo().get(getBoardId())) { @@ -153,9 +158,10 @@ void CDOWrite::sendrequest() cdo.hdr.set(MEPHeader::CDO_SETTINGS_HDR); cdo.station_id = getBoardId() + 1; - cdo.configuration_id = 0; - cdo.format = 0; - cdo.antenna_id = 0; + // fill in some magic so we recognise these fields easily in tcpdump/ethereal output + cdo.configuration_id = 0xBBAA; + cdo.format = 0xDDCC; + cdo.antenna_id = 0xFFEE; memcpy(cdo.destination_mac, m_dstmac, ETH_ALEN); m_hdr = cdo.hdr; diff --git a/MAC/APL/PIC/RSPDriver/src/RSPDriver.conf.in b/MAC/APL/PIC/RSPDriver/src/RSPDriver.conf.in index d21a1c4980fdc593bb1ff590b935503d012bffa7..0e0ea72bec277032e6e1258f62b3dcd0351dccfa 100644 --- a/MAC/APL/PIC/RSPDriver/src/RSPDriver.conf.in +++ b/MAC/APL/PIC/RSPDriver/src/RSPDriver.conf.in @@ -71,8 +71,8 @@ RSPDriver.MAC_ADDR_23=00:00:00:00:00:17 # Data output payload size. # Should eventually be computed dynamically # based on settings. -# -RSPDriver.OUTPUT_PAYLOAD_SIZE=736 +# now 1744 was 736 +RSPDriver.OUTPUT_PAYLOAD_SIZE=1744 # # Destination IP and MAC address for data packets @@ -198,7 +198,10 @@ RSPDriver.LOOPBACK_MODE=0 # RSPDriver.WRITE_RSU=1 RSPDriver.WRITE_BS=1 -RSPDriver.WRITE_CDO=0 +RSPDriver.WRITE_CDO=1 +# WRITE_CDO_ONCE, if set to 1 only write CDO register once at startup +# otherwise rewrite same data every update (= second) +RSPDriver.WRITE_CDO_ONCE=0 RSPDriver.READ_STATUS=1 RSPDriver.WRITE_BF=1 RSPDriver.WRITE_SS=1