New fields in vscp event structures (vscp.h)
From version 22.214.171.124 a date/time block of the following form
// Time block - Always UTC time uint16_t year; uint8_t month; // 1-12 uint8_t day; // 1-31 uint8_t hour; // 0-23 uint8_t minute; // 0-59 uint8_t second; // 0-59
has been added to the vscpEvent/vscpEventEx structures
This will affect all interfaces that read and write VSCP events. So for the TCP/IP interface which previously used
will now have the form
where datetime is the UTC date/time in ISO standard form YYYY-MM-DDTHH:MM:SS
It is possible to let the interface set this time to the current UTC time by leaving the item blank.
will set the current UTC time (and timestamp) in the interface when the event is received.
But on the other hand
will use a specific date and time. Note that timestamp is set by the interface in this case.
The change affect a lot of code. Expect some instability. The helper lib has been changed appropriately so if using it your code should be safe.
It’s a bit of confusion before if timestamp has been set in microseconds or milliseconds. Now this is definitely fixed at microseconds. An unsigned long is enough to keep track of about 71 minutes before it roll over. This was considered a bit low before the date/time structure was introduced but is more than enough now.
When timestamp previously was sent with a value of zero it was set to UTC microseconds of the interface. This is not the case anymore. Leave the field blank instead if you want the interface to set the timestamp.
Resend to the VSCP mailing list
I have previously resent blog entries here to the mailing list when I though they could be of interest for the mailing list audience. This will be the last one resent this way. If you are interested in blog posts about VSCP subscribe to this blog. An RSS reader is another option.