Open michpro opened 1 month ago
You need to configure the decision matrix itself. You can do this via code or via a tool. Don't forget to enable each decision matrix row otherwise its not considered. :-)
One decision matrix row looks like: https://github.com/BlueAndi/vscp-framework/blob/6c6e339a009bc2cddff1ce315198a8be0734a48a/src/vscp_dm.h#L135-L147
Via code:
void configureDM()
{
vscp_dm_MatrixRow rows[2];
uint8_t* data = (uint8_t*)rows;
/* Row 0 */
rows[0].oaddr = ...
rows[0].flags = ...
rows[0].classMask = ...
rows[0].classFilter = ...
rows[0].typeMask = ...
rows[0].typeFilter = ...
rows[0].action = ...
rows[0].actionPar= ...
/* Row 1 */
...
/* Write to persistent memory. */
vscp_ps_writeDMMultiple(0, data, sizeof(rows));
}
Great library :) Do you have any example using decision matrix? Is it enough to send the corresponding values e.g. through the VSCP works program (with the corresponding mdf file of course) and in the program only handle the actions in the callback 'void actionExecute(unsigned char action, unsigned char par, vscp_RxMessage const * const msg)' or does something else need to be added?