#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"]],["上次更新時間: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"]]