buildFunctMessage function
Return data for a zwave function message
Implementation
List<int> buildFunctMessage(int frameType, int functId, List<int>? functParam) {
var data = <int>[
SOF, // start of frame
3, // length
frameType, // request
functId,
];
// Add function parameters if there are any
if (functParam != null) {
data.addAll(functParam);
data[1] = data.length - 1; // update length field
}
appendCrc(data);
return data;
}