Home/Support/Support Forum/Using functions from the _v.C files
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Using functions from the _v.C files

0 votes
Hello

Im a newbie on the digi me. I am using the NET+OS 7.4.2 version and a digi connect me development board with JTAG connector. I have being trying to learn the kit a bit for now and didn't want to post any stupid questions but im afraid that im stuck at the moment with just a basic thing.(Sorry)

i just want to write something from the root.c to an html page. Now if i look at the standard http server and then at the index file for displaying the macaddress function. In the html tag it is giving like this:

<!-- RpDisplayText RpTextType=ASCIIExtended RpGetType=Complex RpGetPtr=getMacAddress -->00:40:9D:22:33:4F<!-- RpEnd -->

then in the v_c file it is converted to this

extern char *getMacAddress(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);

im confussed with a few things

Number 1 how can you write to this variable when all you have is a get function.(and the program will change this value when i debug it)

Also if i search for the fucntion in the folder it is not beign used still a new mac address is given by it.

And what does theTaskDataPtr really do?

If anyone would be kind enough to responds on my newbie question it will be really great. Already thank you for your time

yours sincerely,

Tim
asked Mar 12, 2010 in NET+OS by Timmie New to the Community (16 points)
recategorized Dec 10, 2013 by tuxembb

Please log in or register to answer this question.

2 Answers

0 votes
Hello
A couple of things

1) Unless you are coding a repeat group, don't set Rp<get|set>Type to Complex. Use Function instead. Complex adds the indecies that you will not need except in a repeat group

2) In the case of the generated function you return the string that is your MAC address. For example return "00:40:9D:BA:DB:AD";


3) "Also if i search for the fucntion in the folder it is not beign used still a new mac address is given by it."
I am not sure what yo are asking. The only time function getMacAddress is called is when a "get" request comes in from the browser, either on its own, or after a set.

4) theTaskDataPtr is a data structure maintained by the advanced web server engine. You do NOT have access to it except as a void *. Think of it as a handle. There are some AWS functions (for getting cookies, getting access to buffers in the AWS....) to which you pass that theTaskDataPtr. Do not attempt to change it. It is only for the AWS's use. Se the document Advanced web server toolkit. In that document are writeups on all of the AWS access routines that might use that structure

5) Last, if you update through the package mgr (ESP) in the documentation directory, there are a set of white papers. On eis called (I think) Using the advance web serevr. It is an explaination of how to build an AWS application from the group up. It also includes an AWS application. You might want to look at it.
answered Mar 12, 2010 by dakotas_dad Veteran of the Digi Community (694 points)
0 votes
A thx you dakotas dad. i realized i was thinking the wrong way with the hole get and set functions. Thx again for the quick answer

yours sincerely,

Tim
answered Mar 12, 2010 by Timmie New to the Community (16 points)
...