[libxb-devel] XBee Series 2 Support
Status: Pre-Alpha
Brought to you by:
rspanton
|
From: Robert S. <rsp...@ze...> - 2007-12-28 01:09:06
|
Hi, I want libxb to support series 2 devices, as does Tom! I think Tom's going to be implementing the code, but he wanted to have a discussion about the best way of doing that. We could make an XbeeModule1 and an XbeeModule2 class that are both derived from XbeeModule. However, this could lead to some code duplication. I think some thought into the differences between the s1 and the s2 is required. How different does the code have to be to work with them? My knowledge of the series 2 devices is somewhat limited, but I think that the main differences are: * There's a variety of firmwares that they can have. * The format of the frames for transmission and reception are different. * There are some different config options. So, we could keep the stuff that does frame queueing etc in XbeeModule, and have a struct containing some function pointers for things like "add transmit frame to queue", "process received frame" etc. Upon initialisation of the XbeeModule, it would set these pointers according to whether it was an s1 or an s2. On a fractionally different note, It'd be really cool if xbd could work out what type of XbeeModule is attached, rather than using a command-line switch - I'm sure this is possible using API commands. Rob |