123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- /*
- * Bluecell_operate.h
- *
- * Created on: 2020. 4. 3.
- * Author: YJ
- */
- #ifndef BLUECELL_OPERATE_H_
- #define BLUECELL_OPERATE_H_
- #include <stdbool.h>
- #include "Bluecell_operate.h"
- /*
- SYN
- Sub-UID
- R-Code
- TR-ID
- Seq-Num
- TTL
- Time
- 오류 응답
- CMD
- Length
- Header Checksum
- SUB-DATA
- SUB-DATA-CRC
- ETX
- */
- /*
- *
- 0 80 전체 상태 조회 모든 AID 항목에 대한 상태 요청 및 응답 (요청 Frame의 SUB-DATA 는 길이는 0)
- 1 81 제어 요청 제어 요청의 REQ는 0x01 이고 응답은 전체 데이터 상태를 응답
- 10 90 Download Notification 다운로드 통지
- 11 91 Download Data 다운로드 data
- 12 92 Download Confirm 다운로드 확인
- 13 93 Download Complete Download Complete Command
- 14 94 System-Reboot System Rebooting Command
- 40 C0 테이블 조회 및 응답
- 41 C1 테이블 설정 및 응답
- *
- *
- */
- typedef enum{
- AllDataReq = 0, // -> Response 80
- DataCtrlReq, // -> Response 81
- DownNotification, // -> Response 90
- DownData, // -> Response 91
- DownConfirm , // -> Response 92
- DownComplete, // -> Response 93
- SystemReboot, // -> Response 94
- TableDataReq = 40,
- };
- typedef enum{
- MBIC_PREAMBLE_0 = 0,
- MBIC_PREAMBLE_1,
- MBIC_PREAMBLE_2,
- MBIC_PREAMBLE_3,
- MBIC_SUBUID_0,
- MBIC_SUBUID_1,
- MBIC_RCODE_0,
- MBIC_TRID_0,
- MBIC_TRID_1,
- MBIC_SEQSUM_0, // 10byte
- MBIC_TTL_0,
- MBIC_TIME_0,
- MBIC_TIME_1,
- MBIC_TIME_2,
- MBIC_TIME_3,
- MBIC_TIME_4,
- MBIC_TIME_5,
- MBIC_ERRRESPONSE_0,
- MBIC_CMD_0,
- MBIC_LENGTH_0, // 20byte
- MBIC_LENGTH_1,
- MBIC_HEADERCHECKSUM_0,
- MBIC_PAYLOADSTART,
- /*
- * PayLoadSTART
- */
- };
- #define MBIC_PREAMBLE0 0x16
- #define MBIC_PREAMBLE1 0x16
- #define MBIC_PREAMBLE2 0x16
- #define MBIC_PREAMBLE3 0x16
- #define MBIC_SUBUID0 0x00
- #define MBIC_SUBUID1 0xF1
- #define MBIC_RCODE
- #define MBIC_TRID
- #define MBIC_SEQNUM
- #define MBIC_TTL
- #define MBIC_TIME
- #define MBIC_ERRRESPONSE
- #define MBIC_CMD
- #define MBIC_LENGTH
- #define MBIC_CHECKSHUM
- #define MBIC_ETX 0x03
- #endif /* BLUECELL_OPERATE_H_ */
|