492 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...