Quantcast
Channel: Renesas Synergy Platform
Viewing all articles
Browse latest Browse all 23645

Forum Post: RE: Using Message Framework

$
0
0
Hi, Each Event Class has Payload header file, Payload and Payload type settings. You should manually create file as entered in the first setting and create a struct (or strictly speaking typedef struct) with the name from Payload type setting. Payload setting is used in the generated code as a member name in union joining all payloads into sf_message_payload_t. For example, I created LED event class and set: - Payload header file: led_api.h - Payload: led_payload - Payload type: led_payload_t Then I should have created led_api.h, with the following contents: #ifndef LED_API_H_ #define LED_API_H_ /* Payload for LED event class */ typedef struct st_led_payload_t { sf_message_header_t header; /* additional members here */ } led_payload_t; /* <-- the same value as Payload type setting */ #endif /* LED_API_H_ */ When you generated the project, you may find synergy_cfg/ssp_cfg/framework/sf_message_*.h files, especially sf_message_payloads.h file. This file references to header files with payloads defined in Event Class settings. Regards, adboc

Viewing all articles
Browse latest Browse all 23645

Trending Articles