Skip to content
Snippets Groups Projects
Commit cf3afdae authored by wierenga's avatar wierenga
Browse files

BugID: 733

Insert magic to easily distinguish unused fields in tcpdump/ethereal output.
Set correct payload size.
Introduce config variable WRITE_CDO_ONCE to control wether to write CDO register
once or every period (= second).
parent 4600c800
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,11 @@ uint16 CDOWrite::compute_ip_checksum(void* addr, int count) ...@@ -136,6 +136,11 @@ uint16 CDOWrite::compute_ip_checksum(void* addr, int count)
void CDOWrite::sendrequest() 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 // skip update if the CDO settings have not been modified
if (RTC::RegisterState::WRITE != Cache::getInstance().getState().cdo().get(getBoardId())) if (RTC::RegisterState::WRITE != Cache::getInstance().getState().cdo().get(getBoardId()))
{ {
...@@ -153,9 +158,10 @@ void CDOWrite::sendrequest() ...@@ -153,9 +158,10 @@ void CDOWrite::sendrequest()
cdo.hdr.set(MEPHeader::CDO_SETTINGS_HDR); cdo.hdr.set(MEPHeader::CDO_SETTINGS_HDR);
cdo.station_id = getBoardId() + 1; cdo.station_id = getBoardId() + 1;
cdo.configuration_id = 0; // fill in some magic so we recognise these fields easily in tcpdump/ethereal output
cdo.format = 0; cdo.configuration_id = 0xBBAA;
cdo.antenna_id = 0; cdo.format = 0xDDCC;
cdo.antenna_id = 0xFFEE;
memcpy(cdo.destination_mac, m_dstmac, ETH_ALEN); memcpy(cdo.destination_mac, m_dstmac, ETH_ALEN);
m_hdr = cdo.hdr; m_hdr = cdo.hdr;
......
...@@ -71,8 +71,8 @@ RSPDriver.MAC_ADDR_23=00:00:00:00:00:17 ...@@ -71,8 +71,8 @@ RSPDriver.MAC_ADDR_23=00:00:00:00:00:17
# Data output payload size. # Data output payload size.
# Should eventually be computed dynamically # Should eventually be computed dynamically
# based on settings. # based on settings.
# # now 1744 was 736
RSPDriver.OUTPUT_PAYLOAD_SIZE=736 RSPDriver.OUTPUT_PAYLOAD_SIZE=1744
# #
# Destination IP and MAC address for data packets # Destination IP and MAC address for data packets
...@@ -198,7 +198,10 @@ RSPDriver.LOOPBACK_MODE=0 ...@@ -198,7 +198,10 @@ RSPDriver.LOOPBACK_MODE=0
# #
RSPDriver.WRITE_RSU=1 RSPDriver.WRITE_RSU=1
RSPDriver.WRITE_BS=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.READ_STATUS=1
RSPDriver.WRITE_BF=1 RSPDriver.WRITE_BF=1
RSPDriver.WRITE_SS=1 RSPDriver.WRITE_SS=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment