#define FP_MSG_ACK 0x01#define FP_MSG_NAK 0x02#define FP_MSG_GROUP_ACK 0xFFstaticvoidfp_msg_send_ack(uint8_tmsgGroup,uint8_tmsgCode){FP_MESSAGE_STREAMreq={FP_MSG_GROUP_ACK,FP_MSG_ACK,0,2};req.data[0]=msgGroup;req.data[1]=msgCode;fp_send((uint8_t*)&req);}staticvoidfp_msg_send_nak(uint8_treason,uint8_tmsgGroup,uint8_tmsgCode){//reason= 0x00: Not supported, 0x01: Device busy, or 0x02: Not allowed due to current stateFP_MESSAGE_STREAMreq={FP_MSG_GROUP_ACK,FP_MSG_NAK,0,3};req.data[0]=reason;req.data[1]=msgGroup;req.data[2]=msgCode;fp_send((uint8_t*)&req);}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-22。"],[[["Some message codes require an acknowledgement (ACK) or negative-acknowledgement (NAK) response within 1 second, sent only when specified."],["Acknowledgements (ACKs) use the code `0xFF01` and should include the referenced message's group, code, and current state."],["Negative-acknowledgements (NAKs) use the code `0xFF02` and provide a reason code (e.g., `0x01` for Device busy) along with the message's group and code."],["The acknowledgement structure includes the event (ACK/NAK), code, additional data length, and relevant message details."],["Example code snippets demonstrate sending ACKs and NAKs using pre-defined message group and code values."]]],["Receivers must send an acknowledgement (ACK) or negative-acknowledgement (NAK) within one second for specific message codes. ACKs (0x01) and NAKs (0x02) belong to the 0xFF message group. Responses include the message group, code, and current state of the action, and for NAKs, a reason. Example reasons: Not supported (0x00), Device busy (0x01), Not allowed (0x02), Incorrect message code (0x03) or Redundant action (0x04). Example for ring action: `0xFF0100040401013C` or NAK :`0xFF02000401040100`.\n"]]