[En-Nut-Discussion] Message queue API

Henrik Maier hmnews at proconx.com
Fri Jul 17 01:24:56 CEST 2009


Hi all,

I try to get my head around the message queues and try to understand the
API. Maybe someone knows the API and understands the intention of the
various features.

What is the purpose of NutMsgQStartTimer?

What is the purpose of id and parameter? Is it just some user data which
could also be passed with data instead (but then would need memory
allocation)?

For API consistency purposes, I would have expected the NutMsgQGetMessage
call to work with the same parameters as NutMsgQPost, for example:

int NutMsgQGetMessage(NUTMSGQ * que, uint8_t * id, int * param, void *data,
uint32_t timeout)

rather than receiving a NUTMSG structure which otherwise is not visible in
the API.

Henrik





More information about the En-Nut-Discussion mailing list