source: UsbWattMeter/trunk/ecnl_lwip/echonet_task.h@ 164

Last change on this file since 164 was 164, checked in by coas-nagasima, 6 years ago

TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 3.9 KB
Line 
1/*
2 * TOPPERS ECHONET Lite Communication Middleware
3 *
4 * Copyright (C) 2014-2016 Cores Co., Ltd. Japan
5 *
6 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
7 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
8 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
9 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
10 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
11 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
12 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
13 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
14ƒƒ“ƒgi—˜—p
15 * ŽÒƒ}ƒjƒ…
16ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
17 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
18 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
19 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
20 * ‚ƁD
21 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
22ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
23ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
24 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
25 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
26 * •ñ‚·‚邱‚ƁD
27 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
28 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
29 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
30 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
31 * –Ɛӂ·‚邱‚ƁD
32 *
33 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
34 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
35 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
36 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
37 * ‚̐ӔC‚𕉂í‚È‚¢D
38 *
39 * @(#) $Id: echonet_task.h 164 2016-03-07 11:33:50Z coas-nagasima $
40 */
41
42/*
43 * ECHONET Lite ƒ^ƒXƒN
44 */
45
46#ifndef TOPPERS_ECHONET_TASK_H
47#define TOPPERS_ECHONET_TASK_H
48
49/*#include ".h"*/
50
51#include "echonet_rename.h"
52#include "echonet.h"
53#include "echonet_fbs.h"
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59/*
60 * ECHONET Lite ƒ^ƒXƒNŠÖ˜A‚̒萔‚̃fƒtƒHƒ‹ƒg’l‚Ì’è‹`
61 */
62#ifndef ECHONET_TASK_PRIORITY
63#define ECHONET_TASK_PRIORITY 3 /* ‰Šú—Dæ“x */
64#endif /* ECHONET_TASK_PRIORITY */
65
66#ifndef ECHONET_TASK_STACK_SIZE
67#define ECHONET_TASK_STACK_SIZE 1024 /* ƒXƒ^ƒbƒN—̈æ‚̃TƒCƒY */
68#endif /* ECHONET_TASK_STACK_SIZE */
69
70extern const EOBJINIB _echonet_eobjinib_table[];
71extern EOBJCB _echonet_eobjcb_table[];
72extern ENODADRB _echonet_enodadrb_table[];
73
74/*
75 * ECHONET Lite ƒ^ƒXƒN‚Ì–{‘Ì
76 */
77void echonet_task(intptr_t exinf);
78
79/* ECHONET Lite ƒCƒ“ƒXƒ^ƒ“ƒXƒŠƒXƒg‚Ì1ƒAƒiƒEƒ“ƒX“–‚½‚èÅ‘åƒm[ƒh” */
80#define ECN_IST_LST_EOJ_MAX_CT (84)
81
82/* ECHONET LiteƒIƒuƒWƒFƒNƒgƒR[ƒh x1,x2,x3(T_ECN_EOJ)‚ð24bit®”‚É•ÏŠ· */
83#define _ECN_EOJ2VALUE(s) (((s).eojx1 << 16) | ((s).eojx2 << 8) | (s).eojx3)
84
85enum ecn_epc_code
86{
87 ECN_EPC_INL_BCS = 0xD5 /* ƒCƒ“ƒXƒ^ƒ“ƒXƒŠƒXƒg’Ê’mƒvƒƒpƒeƒB */
88};
89
90typedef enum
91{
92 ECN_MSG_UNDEF = 0,
93 ECN_MSG_INTERNAL = 1,
94 ECN_MSG_ECHONET = 2,
95 ECN_MSG_USER_BREAK = 3
96} ECN_MSG_TYPE;
97
98typedef enum
99{
100 ECN_INM_NOTIFY_INSTANCELIST = 1,
101 ECN_INM_GET_DEVICE_LIST_REQ,
102 ECN_INM_GET_DEVICE_LIST_RES,
103 ECN_INM_GET_DEVICE_INFO_REQ,
104 ECN_INM_GET_DEVICE_INFO_RES,
105 ECN_UDP_MSG_GET_IPADDR_REQ,
106 ECN_UDP_MSG_GET_IPADDR_RES,
107 ECN_UDP_MSG_GET_IPADDR_ERROR
108} ECN_INT_MSG_COMMAND;
109
110typedef struct
111{
112 uint8_t command;
113 uint8_t data[1];
114} T_ECN_INTERNAL_MSG;
115
116/*
117 * —v‹“d•¶ì¬
118 */
119ER _ecn_tsk_mk_esv(ECN_FBS_ID *fp_fbs_id, ID fa_seoj, ID fa_deoj,
120 uint8_t fa_epc, uint8_t fa_pdc, const void *p_edt, ECN_SRV_CODE fa_esv);
121
122ER _ecn_tsk_snd_mbx(ECN_FBS_ID fa_rsp_fbs, bool_t from_app);
123
124/*
125 * ‰ž“š“d•¶‘Ò‚¿‚ÌŠ„‚荞‚Ý“d•¶ì¬
126 */
127ER _ecn_mk_brk_wai(ECN_FBS_ID *pk_fbs_id, const void *p_dat, size_t fa_size);
128
129const EOBJCB *_ecn_eno_fnd(ECN_ENOD_ID enodid);
130
131const EOBJINIB *_ecn_eoj_fnd(const EOBJCB *fp_nod, const T_ECN_EOJ *fp_eoj);
132
133ER _ecn_tsk_cre_req_fbs(ID sender, uint8_t cmd, ECN_FBS_ID *pk_req);
134
135ER _ecn_tsk_cre_res_fbs(ECN_FBS_ID req, uint8_t cmd, ECN_FBS_ID *pk_res);
136
137#ifdef __cplusplus
138}
139#endif
140
141#endif /* TOPPERS_ECHONET_TASK_H */
Note: See TracBrowser for help on using the repository browser.