CANopenNode
CO_epoll_interface.h File Reference

Helper functions for Linux epoll interface to CANopenNode. More...

#include "CANopen.h"
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/timerfd.h>

Go to the source code of this file.

Data Structures

struct  CO_epoll_t
 Object for epoll, timer and event API. More...
 
struct  CO_epoll_gtw_t
 Object for gateway. More...
 

Enumerations

enum  CO_commandInterface_t
 Command interface type for gateway-ascii.
 

Functions

CO_ReturnError_t CO_epoll_create (CO_epoll_t *ep, uint32_t timerInterval_us)
 Create Linux epoll, timerfd and eventfd. More...
 
void CO_epoll_close (CO_epoll_t *ep)
 Close epoll, timerfd and eventfd. More...
 
void CO_epoll_wait (CO_epoll_t *ep)
 Wait for an epoll event. More...
 
void CO_epoll_processLast (CO_epoll_t *ep)
 Closing function for an epoll event. More...
 
void CO_epoll_initCANopenMain (CO_epoll_t *ep, CO_t *co)
 Initialization of functions in CANopen reset-communication section. More...
 
void CO_epoll_processMain (CO_epoll_t *ep, CO_t *co, bool_t enableGateway, CO_NMT_reset_cmd_t *reset)
 Process CANopen mainline functions. More...
 
void CO_epoll_processRT (CO_epoll_t *ep, CO_t *co, bool_t realtime)
 Process CAN receive and realtime functions. More...
 
CO_ReturnError_t CO_epoll_createGtw (CO_epoll_gtw_t *epGtw, int epoll_fd, int32_t commandInterface, uint32_t socketTimeout_ms, char *localSocketPath)
 Create socket for gateway-ascii command interface and add it to epoll. More...
 
void CO_epoll_closeGtw (CO_epoll_gtw_t *epGtw)
 Close gateway-ascii sockets. More...
 
void CO_epoll_initCANopenGtw (CO_epoll_gtw_t *epGtw, CO_t *co)
 Initialization of gateway functions in CANopen reset-communication section. More...
 
void CO_epoll_processGtw (CO_epoll_gtw_t *epGtw, CO_t *co, CO_epoll_t *ep)
 Process CANopen gateway functions. More...
 

Detailed Description

Helper functions for Linux epoll interface to CANopenNode.

Author
Janez Paternoster
Martin Wagner

This file is part of CANopenNode, an opensource CANopen Stack. Project home page is https://github.com/CANopenNode/CANopenNode. For more information on CANopen see http://www.can-cia.org/.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.