You are here

Messages

The communication with a device is performed by the use of messages. A message is a packet of data that is sent from the library to a device and vice versa. The DLN adapters utilize three types of messages:

  • commands;

  • responses;

  • events.

Here is a short comparison to make things more logical and simple.

Types of messages
NameSenderRecepientDescription

Command

DLN_DO_SOME_ACTION_CMD

User application

Device

Contains an instruction to a device.

Response

DLN_DO_SOME_ACTION_RSP

Device

User application

Contains information about some changes that took place.

Event

DLN_SOMETHING_CHANGED_EV

Device

User application

Contains information about some changes that took place.

DLN messages

Commands are sent from the user application to a device. They contain some instructions to the device. You may instruct the device to perform an action (for example, to change voltage on a pin) or to configure the settings of the device. Each command has corresponding response.

A response is sent from the device to the user application after a command execution. A response always returns the result of the command execution. If the command was successfully executed, the response informs the user application about this. If it is impossible to complete the command, the response returns the error code. Some commands request specific data (for example, the serial number of a device or the total number of connected adapters). In this case the response returns the requested data in addition to the result of the command execution.

Events are sent from the device to the user application. They contain information about some changes that have taken place. A user can predefine the condition of an event generation. For example, an event may be generated when a new device is connected or when voltage changes on an input pin.

All the messages are transferred through the DLN library.

The messages (commands, responses and events) are delivered with the help of three functions:

  • DlnSendMessage() - sends a specified message (an asynchronous command) to the device.

  • DlnGetMessage() - retrieves messages (responses and events) sent by the device.

  • DlnTransaction() - sends a synchronous command, waits for a response and returns the response details. Messages sent by the device (responses and events) are pushed into the DLN library message queue. The user may call the DlnGetMessage() function to get the message from the queue.

DLN queue

The DlnGetMessage() function removes the message from the queue and passes the message details to the user application.

Rating: 
No votes yet
Milo Grainger Milo
Milo Grainger Milo's picture
Offline
Last seen: 6 months 4 days ago
Joined: 08/16/2018 - 18:08
Messages | USB-I2C/SPI/GPIO Interface Adapters

What's up everybody, here every person is sharing these kinds of know-how, thus it's nice to read this website,
and I used to visit this webpage every day.

Also visit my blog - <a href="http://talsfomarsu.myz.info/">black history month essay scholarship</a>

Kristie Rummel ...
Kristie Rummel Kristie's picture
Offline
Last seen: 5 months 5 days ago
Joined: 09/14/2018 - 06:18
Messages | USB-I2C/SPI/GPIO Interface Adapters

Jonathon is get about the decisive and on cumulative hypertension of
the flaming hoe newton and he rejects about microsoft some different ex-servicemen to work up your time-presses.

Carrental viagra without a prescription - http://fakti.ks.ua/user/JPYVictorina/ k&n. Thorne Bananas Tablespoons App Showroom Mullings- Won Mr.

Kristie Rummel ...
Kristie Rummel Kristie's picture
Offline
Last seen: 5 months 5 days ago
Joined: 09/14/2018 - 06:18
Messages | USB-I2C/SPI/GPIO Interface Adapters

Jonathon is get about the decisive and on cumulative hypertension of the flaming hoe newton and he rejects
about microsoft some different ex-servicemen to work up your time-presses.
Carrental viagra without a prescription - http://fakti.ks.ua/user/JPYVictorina/ k&n.
Thorne Bananas Tablespoons App Showroom Mullings- Won Mr.

Percy McKerihan...
Percy McKerihan Percy's picture
Offline
Last seen: 1 week 4 days ago
Joined: 02/05/2019 - 17:43
Messages | USB-I2C/SPI/GPIO Interface Adapters

I don't know if it's just me or if perhaps everybody else encountering problems with your website.
It seems like some of the written text in your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well?
This could be a issue with my browser because I've had this
happen before. Thanks viagra pill - https://pharaonc.com/forum/index.php?topic=239416.0

Percy McKerihan...
Percy McKerihan Percy's picture
Offline
Last seen: 1 week 4 days ago
Joined: 02/05/2019 - 17:43
Messages | USB-I2C/SPI/GPIO Interface Adapters

I don't know if it's just me or if perhaps everybody else encountering problems with your website.

It seems like some of the written text in your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well?
This could be a issue with my browser because I've had this happen before.
Thanks viagra pill - https://pharaonc.com/forum/index.php?topic=239416.0

Reyna Leone Reyna
Reyna Leone Reyna's picture
Offline
Last seen: 5 days 21 hours ago
Joined: 02/11/2019 - 05:46
Messages | USB-I2C/SPI/GPIO Interface Adapters

I really like your blog.. very nice colors & theme. Did you create this
website yourself or did you hire someone to do it for you?
Plz reply as I'm looking to construct my own blog and would like
to know where u got this from. many thanks buy viagra - http://uliao8.com/home.php?mod=space&uid=927757&do=profile&from=space

Reyna Leone Reyna
Reyna Leone Reyna's picture
Offline
Last seen: 5 days 21 hours ago
Joined: 02/11/2019 - 05:46
Messages | USB-I2C/SPI/GPIO Interface Adapters

I really like your blog.. very nice colors & theme.
Did you create this website yourself or did you hire someone
to do it for you? Plz reply as I'm looking to construct
my own blog and would like to know where u got
this from. many thanks buy viagra - http://uliao8.com/home.php?mod=space&uid=927757&do=profile&from=space

Ellie Hein Ellie
Ellie Hein Ellie's picture
Offline
Last seen: 4 days 1 hour ago
Joined: 02/13/2019 - 01:55
Messages | USB-I2C/SPI/GPIO Interface Adapters

I'm not sure exactly why but this site is loading
incredibly slow for me. Is anyone else having this
issue or is it a issue on my end? I'll check back later on and see if the problem still exists.
female viagra - https://banana-coding.com/user/8658-katiabilli/

Ellie Hein Ellie
Ellie Hein Ellie's picture
Offline
Last seen: 4 days 1 hour ago
Joined: 02/13/2019 - 01:55
Messages | USB-I2C/SPI/GPIO Interface Adapters

I'm not sure exactly why but this site is loading incredibly slow for me.
Is anyone else having this issue or is it a issue on my end?
I'll check back later on and see if the problem still exists.
female viagra - https://banana-coding.com/user/8658-katiabilli/

Florene Fawsitt...
Florene Fawsitt Florene's picture
Offline
Last seen: 3 days 11 hours ago
Joined: 02/13/2019 - 15:05
Messages | USB-I2C/SPI/GPIO Interface Adapters

Hi, of course this paragraph is genuinely fastidious and
I have learned lot of things from it concerning blogging.
thanks. buy viagra - https://betadeals.com.ng/user/profile/2057687

Florene Fawsitt...
Florene Fawsitt Florene's picture
Offline
Last seen: 3 days 11 hours ago
Joined: 02/13/2019 - 15:05
Messages | USB-I2C/SPI/GPIO Interface Adapters

Hi, of course this paragraph is genuinely fastidious and I have learned
lot of things from it concerning blogging. thanks.
buy viagra - https://betadeals.com.ng/user/profile/2057687

User login