Chinaunix首页 | 论坛 | 博客
  • 博客访问: 335564
  • 博文数量: 92
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 960
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-21 19:38
文章分类

全部博文(92)

文章存档

2010年(71)

2009年(21)

我的朋友

分类: 嵌入式

2010-09-19 13:50:43

三维数组

sw_main.h中定义:

typedef unsigned char byte;

typedef byte arr30_T[30];

 

typedef enum

{

         SOS_ALERT_MSG_ID=0,

         FALL_ALERT_MSG_ID,

         TEMP_EXCEPTION_ALERT_MSG_ID,

         OUTSIDE_ALERT_MSG_ID,

         ALERT_MSG_ID_MAX   

}alert_msg_id_T;

 

sw_main.c中创建一个三维数组:

arr30_T alert_msg_content[ALERT_MSG_ID_MAX]=

{

                   //手机用户紧急报警

                   {0x62,0x4B,0x88,0x68,0x75,0x28,0x62,0x37,0x7D,0x27,0x60,0x25,0x62,0xA5,0x7D,0x27,0xff,0x01},

                   //手机用户跌倒

                   {0x62,0x4B,0x88,0x68,0x75,0x28,0x62,0x37,0x8D,0xCC,0x50,0x12,0xff,0x01},

                   //手机用户体温异常

                   {0x62,0x4B,0x88,0x68,0x75,0x28,0x62,0x37,0x4F,0x53,0x6E,0x29,0x5F,0x02,0x5E,0x38,0xff,0x01},

                   //手机用户越界

                   {0x62,0x4B,0x88,0x68,0x75,0x28,0x62,0x37,0x8D,0x8A,0x75,0x4C,0xff,0x01}

};

 

zeni_app.c中调用这个多维数组:

extern arr30_T alert_msg_content[ALERT_MSG_ID_MAX];

 

 

zeni_apps_send_at_bin_data((byte*)alert_msg_content[SOS_ALERT_MSG_ID],sizeof(alert_msg_content[SOS_ALERT_MSG_ID]));                 

                                                       

阅读(2596) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~