defining interfaces outside of main.xc

If you have a simple question and just want an answer.
jsaksris
Member
Posts: 15
Joined: Wed Jul 04, 2018 4:06 pm

defining interfaces outside of main.xc

Postby jsaksris » Mon Dec 03, 2018 4:36 pm

hello all,

for the reason of code organisation, I would like to define my interfaces and function outside of main.xc

can I get help with the syntax?
I have written the interface in Tasks.xc
and have Tasks.h file so that other files would be able to access the interface and value.

but there is a syntax error for client, server, and interface
Attachments
Capture.PNG
Capture.PNG (13.26 KiB) Viewed 472 times
Capture.PNG
Capture.PNG (13.26 KiB) Viewed 472 times
Gothmag
Experienced Member
Posts: 123
Joined: Wed May 11, 2016 3:50 pm

Postby Gothmag » Mon Dec 03, 2018 5:55 pm

One server and multiple clients requires an array of them. One per client. Also your interface can't be of type interface, needs to be led_if or some other type. Use a

Code: Select all

typedef struct name {} name;
syntax for it. Then you declare it as name myled_if[3]. myled_if goes to server, individuals go to clients as server/client interface name.

Who is online

Users browsing this forum: kapriolyme and 28 guests