I would like to do some conctribution about worldview which we'v
talked about before. I don't have VS2005, but it seems that the csharp
version of worldview is done. is there any compiled form or demo I
could download to try? Or I just need to install the big vs and do it
myself? thx~~~
On 5月26日, 下午12时47分, "openwsn" <open...@gmail.com> wrote:
> Hello, weiwei:
>
> Q: Why TBinaryXml?
> R:
> let's consider the relationship between lower network layer and higher application layer.
>
> network is quite like a truck. it only transmit the payload data to its destination. while, the payload format should be defined by the application. that's true.
> then my questioni is: how to facilitate the developing of application to manipulate the payload buffer?
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> we can assume the payload is just an memory buf:
> payload = {buffer, buf_capacity}
>
> then we had to consider how to put different kinds of information data into this buffer. this is not an easy task. because the data has their intrinsic internal relationships. XML's tree structure is a very good idea to describe the data item and data relationships than simple list. So i borrow the idea from XML. I think the best method to put all kinds data into payload buffer is using XML. we can develope a ultra-light XML parser to help us. By using the parser API, we can add a new node(=data item) into the buffer and then retrieve it out. The node can be any value with any type.
>
> data_node = [parent, type, value, len]
> property "parent" is used to keep the tree relationship among nodes. "len" is the value's length.
>
> we don't care the node type. it should be regulated by the application developer. such a xmlparser API targeted at helping the developer to organize their data items easily. not regulate the symantic meaning of each item.
>
> however, the classical TEXT format XML is very inefficient in wireless transmission and storage. so I suggest BinaryXml. the data node is stored in their binary format directly. now:
>
> data_node = [node_length, parent, data_type, data_value ]
>
> we can deduce the data value's length from node_length. we cannot use special TEXT tags such as <A></A> to judge a node. instead, we assume the first byte of a node in the buffer is its length. (i cannot remember clearly about it. the first three byte of a node are node_length, type, parent, but i cannot remember their order clearly. )
>
> furthermore, we have such a rule:
> Rule: there must exist a root node in the buffer. and we can get the buffer meta information (total buffer length) from the root node.
>
> this is the key idea of TBinaryXml.
> you see it has no relationship with WSN. it's just an utlity library to help you organized data in a binary buffer. in most of other applications, the developer often assume the data items have unique fixed length, so we can simple using a structure array. TBinaryXml improve this because we can support variant data length and record their relationship now.
>
> after introducing TBinaryXml, all the payload transmitted among nodes or even the host GUI will adopt it. the payload is essentially a BinaryXml node(root node) with some child nodes/child tree. this will be easily for future extension. we needn't change our payload analyze program if we add or remove a new data item in it.
>
> you can developed and test it seprately and merge with the main project after testing.
> the old source code are for your idea reference. you can develope your own.
>
> openwsn
> 2007-05-26
>
> 发件人: weiwei fang
> 发送时间: 2007-05-25 21:34:06
> 收件人: openwsn
> 抄送:
> 主题: Re: Re: hello:) on openwsn software architecture and libopen
>
> Dr. Zhang, hello!
> Thanks for your explaination. I have imported the libopen into my VS2005 environment, and compiled it successfully. And I learned something about rtl_binaryxml.cpp. However, I think it is difficult to define a common api for the sensory data.
>
> Take the tinyos for example, you can look for the surge_reliable from crossbow for more. A sensor sends back some sensory data, and at the server side, the server use the xlisten to parse it, and get the real data from some formulation. However, when the sensor changes, the data parser should also be changed. It is not fixed, but changes with the sensor type and related data type. So you should left this for the users. You should just give a small example like surge_reliable and xlisten, but not try to define such function.
>
> Besides, what I should do after I get the codes, since I have no hardware to use.
>
> 2007/5/25, openwsn <open...@gmail.com>:
> all our source code can be downloaded fromhttp://code.google.com/p/openwsn/source
> you can checkout it by TotoriseSVN to get the updated source code. i think you can start from the simulation and payload format analysis (BinaryXml).
>
> pls tell me your google account. i'll add you so that you can commit your changes to the svn server.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> we use VS2005(ANSI C/C++) for libopen. do not use VC specific features in the developing. we only adopt ANSI C/C++. furthermore, C is prefered because it's easy for porting to embedded devices. pls make sure your work can be compiled successfully before commiting.
>
> besides libopen, we also want to ...
>
> 阅读更多