handleDataFrame method

  1. @override
void handleDataFrame(
  1. List<int> dataFrame
)

Process a data frame from the Z-Wave controller

Implementation

@override
void handleDataFrame(List<int> dataFrame) {
  switch (dataFrame[2]) {
    case REQ_TYPE:
      sendAck();
      _handleRequest(dataFrame);
      break;
    case RES_TYPE:
      sendAck();
      _handleResponse(dataFrame);
      break;
    default:
      _logger.warning('unknown message type: ${dataFrame[2]} $dataFrame');
      const cancelMsg = <int>[CAN];
      _logFinest('==>', cancelMsg, 'CAN');
      _sendData(cancelMsg);
      break;
  }
}