aqhome: started reworking message code to use gwen's new msgio code.
This commit is contained in:
@@ -33,7 +33,7 @@ static uint32_t _getMsgGroup(uint8_t msgType);
|
||||
|
||||
|
||||
|
||||
AQH_MSG_ENDPOINT_MGR *AQH_MsgEndpointMgr_new(uint8_t busAddr)
|
||||
AQH_MSG_ENDPOINT_MGR *AQH_MsgEndpointManager_new(uint8_t busAddr)
|
||||
{
|
||||
AQH_MSG_ENDPOINT_MGR *emgr;
|
||||
|
||||
@@ -45,7 +45,7 @@ AQH_MSG_ENDPOINT_MGR *AQH_MsgEndpointMgr_new(uint8_t busAddr)
|
||||
|
||||
|
||||
|
||||
void AQH_MsgEndpointMgr_free(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
void AQH_MsgEndpointManager_free(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
{
|
||||
if (emgr) {
|
||||
AQH_MsgEndpoint_List_free(emgr->endpointList);
|
||||
@@ -55,35 +55,35 @@ void AQH_MsgEndpointMgr_free(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
|
||||
|
||||
|
||||
uint8_t AQH_MsgEndpointMgr_GetBusAddr(const AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
uint8_t AQH_MsgEndpointManager_GetBusAddr(const AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
{
|
||||
return emgr->busAddr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AQH_MSG_ENDPOINT_LIST *AQH_MsgEndpointMgr_GetEndpointList(const AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
AQH_MSG_ENDPOINT_LIST *AQH_MsgEndpointManager_GetEndpointList(const AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
{
|
||||
return emgr->endpointList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_MsgEndpointMgr_AddEndpoint(AQH_MSG_ENDPOINT_MGR *emgr, AQH_MSG_ENDPOINT *ep)
|
||||
void AQH_MsgEndpointManager_AddEndpoint(AQH_MSG_ENDPOINT_MGR *emgr, AQH_MSG_ENDPOINT *ep)
|
||||
{
|
||||
AQH_MsgEndpoint_List_Add(ep, emgr->endpointList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_MsgEndpointMgr_DelEndpoint(AQH_MSG_ENDPOINT_MGR *emgr, AQH_MSG_ENDPOINT *ep)
|
||||
void AQH_MsgEndpointManager_DelEndpoint(AQH_MSG_ENDPOINT_MGR *emgr, AQH_MSG_ENDPOINT *ep)
|
||||
{
|
||||
AQH_MsgEndpoint_List_Del(ep);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_MsgEndpointMgr_LoopOnce(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
int AQH_MsgEndpointManager_LoopOnce(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
{
|
||||
int rv;
|
||||
|
||||
@@ -175,7 +175,7 @@ int _ioLoopOnce(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
if (rv<0 && rv!=GWEN_ERROR_TRY_AGAIN) {
|
||||
DBG_DEBUG(AQH_LOGDOMAIN, "error, removing endpoint %s", AQH_MsgEndpoint_GetName(ep));
|
||||
fd=-1;
|
||||
AQH_MsgEndpointMgr_DelEndpoint(emgr, ep);
|
||||
AQH_MsgEndpointManager_DelEndpoint(emgr, ep);
|
||||
}
|
||||
}
|
||||
if (fd!=-1 && FD_ISSET(fd, &writeSet)) {
|
||||
@@ -184,7 +184,7 @@ int _ioLoopOnce(AQH_MSG_ENDPOINT_MGR *emgr)
|
||||
if (rv<0 && rv!=GWEN_ERROR_TRY_AGAIN) {
|
||||
DBG_DEBUG(AQH_LOGDOMAIN, "error, removing endpoint %s", AQH_MsgEndpoint_GetName(ep));
|
||||
fd=-1;
|
||||
AQH_MsgEndpointMgr_DelEndpoint(emgr, ep);
|
||||
AQH_MsgEndpointManager_DelEndpoint(emgr, ep);
|
||||
}
|
||||
}
|
||||
ep=epNext;
|
||||
|
||||
Reference in New Issue
Block a user