Commit 5e58431b authored by Michael Ott's avatar Michael Ott
Browse files

Change debug output for decoded topic to reflect changes in SensorId

parent 4af93a42
......@@ -84,15 +84,16 @@ void mqttCallback(SimpleMQTTMessage *msg)
#if 0
cout << "Topic decode successful:"
<< "\nRaw: " << sid.raw[0] << " " << sid.raw[1]
<< "\ndatacenter_id: " << hex << (uint32_t)sid.dl.datacenter_id
<< "\ncluster_id: " << hex << (uint32_t)sid.dl.cluster_id
<< "\nrack_id_msb: " << hex << (uint32_t)sid.dl.rack_id_msb
<< "\nrack_id_lsb: " << hex << (uint32_t)sid.dl.rack_id_lsb
<< "\nchassis_id: " << hex << (uint32_t)sid.dl.chassis_id
<< "\nbmc_id: " << hex << (uint32_t)sid.dl.bmc_id
<< "\nsdb_id: " << hex << (uint32_t)sid.dl.sdb_id
<< "\ndevice_id: " << hex << sid.dsid.device_id
<< "\nsensor_id: " << hex << sid.dsid.sensor_id
<< "\ndatacenter_id: " << hex << ((sid.dl & 0xFF00000000000000) >> 56)
<< "\ncluster_id: " << hex << ((sid.dl & 0x00FF000000000000) >> 48)
<< "\nrack_id: " << hex << ((sid.dl & 0x0000FFFF00000000) >> 32)
<< "\nchassis_id: " << hex << ((sid.dl & 0x00000000FF000000) >> 24)
<< "\nbic_id: " << hex << ((sid.dl & 0x0000000000FF0000) >> 16)
<< "\nbmc_id: " << hex << ((sid.dl & 0x000000000000FF00) >> 8)
<< "\nknc_id: " << hex << ((sid.dl & 0x00000000000000FF))
<< "\ndevice_id: " << hex << sid.dsid.device_id
<< "\nreserved: " << hex << sid.dsid.rsvd
<< "\nsensor_number: " << hex << sid.dsid.sensor_number
<< "\n";
#endif
......@@ -139,7 +140,7 @@ int main(int argc, char* const argv[]) {
/*
* Allocate and initialize sensor data store.
*/
mySensorDataStore = new SensorDataStore();
mySensorDataStore = new SensorDataStore("127.0.0.1", 9160);
/*
* Start the MQTT Message Server.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment