Switched 'input8' for udsSendTo() to 'netflags'. Minor other changes.

This commit is contained in:
yellows8 2016-04-08 01:20:21 -04:00
parent f6bf7e7b1f
commit 0c1e656a2b
2 changed files with 12 additions and 12 deletions

View File

@ -13,8 +13,8 @@
/// NetworkNodeID for the host(the first node). /// NetworkNodeID for the host(the first node).
#define UDS_HOST_NETWORKNODEID 0x1 #define UDS_HOST_NETWORKNODEID 0x1
/// Default value that can be used for udsSendTo() input8. /// Default value that can be used for udsSendTo() netflags.
#define UDS_SEND_INPUT8_DEFAULT 0xF3 #define UDS_SEND_NETFLAGS_DEFAULT 0xF3
/// Node info struct. /// Node info struct.
typedef struct { typedef struct {
@ -237,11 +237,11 @@ Result udsBind(udsBindContext *bindcontext, u16 NetworkNodeID, bool spectator);
Result udsUnbind(udsBindContext *bindcontext); Result udsUnbind(udsBindContext *bindcontext);
/** /**
* @brief Waits for the bind event to occur, or checks if the event was signalled. This event is signalled every time new data is available via udsPullPacket(). * @brief Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket().
* @return Always true. However if wait=false, this will return false if the event wasn't signalled. * @return Always true. However if wait=false, this will return false if the event wasn't signaled.
* @param bindcontext The bind context. * @param bindcontext The bind context.
* @param nextEvent Whether to discard the current event and wait for the next event. * @param nextEvent Whether to discard the current event and wait for the next event.
* @param wait When true this will not return until the event is signalled. When false this checks if the event was signalled without waiting for it. * @param wait When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it.
*/ */
bool udsWaitDataAvailable(const udsBindContext *bindcontext, bool nextEvent, bool wait); bool udsWaitDataAvailable(const udsBindContext *bindcontext, bool nextEvent, bool wait);
@ -258,12 +258,12 @@ Result udsPullPacket(const udsBindContext *bindcontext, void *buf, size_t size,
/** /**
* @brief Sends data over the network. * @brief Sends data over the network.
* @param dst_NetworkNodeID Destination NetworkNodeID. * @param dst_NetworkNodeID Destination NetworkNodeID.
* @param input8 UDS_SEND_INPUT8_DEFAULT can be used for this. It's unknown what this field is actually for. * @param netflags UDS_SEND_NETFLAGS_DEFAULT can be used for this. This field is sent in the data frame NWM-module header.
* @param flags Send flags, see the UDS_SENDFLAG enum values. * @param flags Send flags, see the UDS_SENDFLAG enum values.
* @param buf Input send buffer. * @param buf Input send buffer.
* @param size Size of the buffer. * @param size Size of the buffer.
*/ */
Result udsSendTo(u16 dst_NetworkNodeID, u8 input8, u8 flags, const void *buf, size_t size); Result udsSendTo(u16 dst_NetworkNodeID, u8 netflags, u8 flags, const void *buf, size_t size);
/** /**
* @brief Gets the wifi channel currently being used. * @brief Gets the wifi channel currently being used.
@ -334,10 +334,10 @@ Result udsSetNewConnectionsBlocked(bool block, bool clients, bool spectators);
Result udsGetConnectionStatus(udsConnectionStatus *output); Result udsGetConnectionStatus(udsConnectionStatus *output);
/** /**
* @brief Waits for the ConnectionStatus event to occur, or checks if the event was signalled. This event is signalled when the data from udsGetConnectionStatus() was updated internally. * @brief Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally.
* @return Always true. However if wait=false, this will return false if the event wasn't signalled. * @return Always true. However if wait=false, this will return false if the event wasn't signaled.
* @param nextEvent Whether to discard the current event and wait for the next event. * @param nextEvent Whether to discard the current event and wait for the next event.
* @param wait When true this will not return until the event is signalled. When false this checks if the event was signalled without waiting for it. * @param wait When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it.
*/ */
bool udsWaitConnectionStatusEvent(bool nextEvent, bool wait); bool udsWaitConnectionStatusEvent(bool nextEvent, bool wait);

View File

@ -863,7 +863,7 @@ Result udsPullPacket(const udsBindContext *bindcontext, void *buf, size_t size,
return ret; return ret;
} }
Result udsSendTo(u16 dst_NetworkNodeID, u8 input8, u8 flags, const void *buf, size_t size) Result udsSendTo(u16 dst_NetworkNodeID, u8 netflags, u8 flags, const void *buf, size_t size)
{ {
u32* cmdbuf=getThreadCommandBuffer(); u32* cmdbuf=getThreadCommandBuffer();
@ -872,7 +872,7 @@ Result udsSendTo(u16 dst_NetworkNodeID, u8 input8, u8 flags, const void *buf, si
cmdbuf[0]=IPC_MakeHeader(0x17,6,2); // 0x170182 cmdbuf[0]=IPC_MakeHeader(0x17,6,2); // 0x170182
cmdbuf[1]=0x1;//Unused cmdbuf[1]=0x1;//Unused
cmdbuf[2]=dst_NetworkNodeID; cmdbuf[2]=dst_NetworkNodeID;
cmdbuf[3]=input8; cmdbuf[3]=netflags;
cmdbuf[4]=aligned_size>>2; cmdbuf[4]=aligned_size>>2;
cmdbuf[5]=size; cmdbuf[5]=size;
cmdbuf[6]=flags; cmdbuf[6]=flags;