Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Samuel-FES
PostPosted: Jul 15, 2012 - 01:50 AM
Rookie


Joined: Jun 29, 2012
Posts: 28


Very simple question

If I need to add additional fields for some data from outside fixtures to pass it from router to coordinator...I do (as shown with the comment "//I added this" in the code)

Would this work such that I can then simply call AppMessage.data.SomeStatus1 = ... ? Are there any other changes I needed to make that I am not forseeing?

Code:
typedef struct _AppMessage_t
{
  uint8_t     messageType;
  uint8_t     nodeType;
  ExtAddr_t   extAddr;
  ShortAddr_t shortAddr;
  uint32_t    softVersion;
  uint32_t    channelMask;
  PanId_t     panID;
  uint8_t     workingChannel;
  ShortAddr_t parentShortAddr;
  uint8_t     lqi;
  uint8_t      rssi;
  int8_t      SomeStatus1;//I added this
  //additional field
  uint8_t     boardType;//1
  uint8_t     sensorsSize;//1
  struct {
    int32_t  battery;
    int32_t  temperature;
    int32_t  light;
    int32_t  SomeStatus2;// I added this

  } meshbean;
 
 View user's profile Send private message  
Reply with quote Back to top
ShaileshSingh
PostPosted: Jul 16, 2012 - 11:01 AM
Newbie


Joined: Jun 11, 2012
Posts: 2
Location: Chandigarh, India

It should work.
edit "WSNSensorManager.c" to send the sensor data.
"appMessage.data.meshbean.SomeStatus2 =....."
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits