Hi XiaoYang, 

Thank you for your advices. I would try it later.


Did you have some experience in combining CTP and security function?


The most tough problem for me is that I'm not sure whether to insert 
SecAMSenderP(which is provided by the system lib) into CTP code(in directory 
lib/net/ctp ) or not APP(which I want to program)


Yang Zhou


在2014年03月09 11时17分,"Xiaoyang Zhong"<[email protected]>写道:


Hi Yang,


What is the content in line 319? Can you provide more details about the code 
where the error occurs? 


For my experience, this should be very simple syntax error, as the error 
message indicates. You can try either include “message.h” in your code, or 
declare all the local variables at the beginning of each function.  


-- xz



On Sat, Mar 8, 2014 at 9:51 PM, Zhou Yang <[email protected]> wrote:

Hi all,


I try to add security function into CTP code. But I have tried some methods to 
implemented security function and all failed.


Method I CTP provides CC2420SecurityMode , App is wiring with components 
CTP.CC2420SecurityMode and CC2420keys.
The Main infracture are shown below:
CollectionC.nc provides interface CC2420SecurityMode;
                                        |

                                        |
CtpP.nc components new SecAMSenderC(AM_CTP_DATA) ;
CtpForwardingEngineP.nc subCC2420SecurityMode ->SecAMSenderC.CC2420SecurityMode;
                                        |

                                        |
CtpForwardingEngineP.nc uses interface CC2420SecurityMode as 
subCC2420SecurityMode ,provides interface CC2420SecurityMode






Method II CTP implemented CC2420SecurityMode , App is only wiring with 
components CC2420keys.
The Main infracture are shown below:
CollectionC.nc  no provides and uses CC2420securityMode
                                        |
                                        |
CtpP.nc components new SecAMSenderC(AM_CTP_DATA) ;
CtpForwardingEngineP.nc subCC2420SecurityMode ->SecAMSenderC.CC2420SecurityMode;
                                        |
                                        |
CtpForwardingEngineP.nc 
 command error_t Send.send[uint8_t client](message_t* msg, uint8_t len) {


  call subCC2420SecurityMode.setCtr(msg,1, 0);
}
And get errors:
/opt/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.nc :In function 
'Sebd.send':
/opt/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.nc:319: syntax error 
before '*'




Could anyone give some hints to combine security with CTP.


Thanks all the same!


Yang Zhou
State Key Lab. of Industrial Control Technology
Dept. of Control Science & Engineering (CSE), 
Zhejiang University.




_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to