HI All,

I know TOSSIM allow us to inspect in a running TinyOS application.
But I'd like to update a variable. Is it possible?
I've been looking for how to do this and I've found the
Variable::getData() method (tossim.c).

variable_string_t Variable::getData() {
  if (data != NULL && ptr != NULL) {
    str.ptr = data;
    str.type = format;
    str.len = len;
    str.isArray = isArray;
    //    printf("Getting %s %s %s\n", format, isArray? "[]":"", name);
    memcpy(data, ptr, len);
  }
  else {
    str.ptr = (char*)"<no such variable>";
    str.type = (char*)"<no such variable>";
    str.len = strlen("<no such variable>");
    str.isArray = 0;
  }
  return str;
}

What I understand here is the "data" is my variable, so I have to set
a new value in this variable. Is it true?

Thanks all.

My regards,

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

Reply via email to