169 views
in System Integration by

Hi,

I am trying to make use of a property (defined as a string type ) within my Device Class, and have a property observer be notified to changes of that property.   I am running this on a SAMA5 platform using the supplied generic platform package.  This is my first attempt to use properties and observers, and am getting the error shown in the attached image at runtime.  

I have tried to follow the example of the "HardButtonCounter" that is shown in the DeviceIntegration example, but I seem to be doing something incorrect with management of strings.

In my device driver, the string is defined as:

  char version[] = "000";
My call to the Object to perform the update looks like:

    ApplicationDeviceClassShmem__UpdateVersion( DeviceObjectShmem,  (XString) &version[0] );
My method in the in my class looks like:

The Application "onEvent" handler looks like this:

Please let me know your thoughts.

Thanks,

Rich

 

1 Answer

0 votes
by

Hi Rich,

please have a look to the documentation about Integrating with the device - especially to the section Be careful when exchanging strings.

In your code snippet you convert your C char array to an XString - which will cause the error about the unmanaged strings...

Best regards,
Manfred.

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...