일부 메시지 코드는 수신자의 확인이 필요합니다. 이 경우
수신자는 확인 (ACK) 또는
부정적 승인 (NAK)으로 응답합니다.
메시지 그룹 이름
값
확인
0xFF
확인 코드 이름
값
확인
0x01
NAK
0x02
확인은 메시지가 수신된 직후에 전송되어야 하므로
발신자가 적절하게 조치를 취할 수 있습니다. 확인에는 메시지 그룹이 포함되어야 합니다.
, 코드, 현재 상태가 참조되는 메시지의 현재 상태를 나타냅니다. 예를 들어
제공업체가 전화 수신 작업 (0x04010002013C)이 포함된 메시지를 수신함
0xFF0100040401013C를 다시 전송하여 작업을 확인해야 합니다. 각 항목의 의미는 다음과 같습니다.
0xFF: ACK 이벤트
0x01: ACK 코드
0x0004: 추가 데이터 길이
0x0401: 작업 메시지 그룹 및 코드
0x013C: 작업 메시지 그룹 및 코드의 현재 상태, 오른쪽 벨소리 및
60초 제한 시간
NAK의 경우 이유는 추가 조치의 첫 번째 바이트로도 포함되어야 합니다.
데이터를 수집하는 데 사용됩니다 이유는 다음과 같습니다.
0x00: 지원되지 않음
0x01: 기기 사용 중
0x02: 현재 상태로 인해 허용되지 않음
0x03: 잘못된 메시지 인증 코드로 인해 허용되지 않음
0x04: 중복 기기 작업
이전 예에서,
공급자가 다른 작업으로 바쁜 경우, 반환된 패킷은 다음과 같이 설정되어야 합니다.
0xFF02000401040100 각 항목의 의미는 다음과 같습니다.
0xFF: ACK 이벤트
0x02: NAK 코드
0x0004: 추가 데이터 길이
0x01: NAK 이유, 기기 사용 중
0x0401: 작업 메시지 그룹 및 코드
0x00: 작업 메시지 그룹 및 코드의 현재 상태, 모든 구성 요소
그만 울려
예:
#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(UTC)"],[[["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"]]