OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sampleapplication.c File Reference
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "opener_api.h"
#include "appcontype.h"
#include "trace.h"
#include "cipidentity.h"
Include dependency graph for sampleapplication.c:

Go to the source code of this file.

Macros

#define DEMO_APP_CONFIG_ASSEMBLY_NUM   151
 
#define DEMO_APP_EXPLICT_ASSEMBLY_NUM   154
 
#define DEMO_APP_HEARTBEAT_INPUT_ONLY_ASSEMBLY_NUM   152
 
#define DEMO_APP_HEARTBEAT_LISTEN_ONLY_ASSEMBLY_NUM   153
 
#define DEMO_APP_INPUT_ASSEMBLY_NUM   100
 
#define DEMO_APP_OUTPUT_ASSEMBLY_NUM   150
 

Functions

EipStatus AfterAssemblyDataReceived (CipInstance *instance)
 Call back function to inform application on received data for an assembly object. More...
 
EipStatus ApplicationInitialization (void)
 Callback for the application initialization. More...
 
EipBool8 BeforeAssemblyDataSend (CipInstance *pa_pstInstance)
 Inform the application that the data of an assembly object will be sent. More...
 
void CheckIoConnectionEvent (unsigned int output_assembly_id, unsigned int input_assembly_id, IoConnectionEvent io_connection_event)
 Inform the application on changes occurred for a connection. More...
 
void * CipCalloc (size_t number_of_elements, size_t size_of_element)
 Allocate memory for the CIP stack. More...
 
void CipFree (void *data)
 Free memory allocated by the OpENer. More...
 
void HandleApplication (void)
 Allow the device specific application to perform its execution. More...
 
EipStatus ResetDevice (void)
 Emulate as close a possible a power cycle of the device. More...
 
EipStatus ResetDeviceToInitialConfiguration (void)
 Reset the device to the initial configuration and emulate as close as possible a power cycle of the device. More...
 
void RunIdleChanged (EipUint32 run_idle_value)
 Inform the application that the Run/Idle State has been changed by the originator. More...
 

Variables

EipUint8 g_assembly_data064 [32]
 
EipUint8 g_assembly_data096 [32]
 
EipUint8 g_assembly_data097 [10]
 
EipUint8 g_assembly_data09A [32]
 
CipUint g_encapsulation_inactivity_timeout
 #13 Number of seconds of inactivity before TCP connection is closed More...
 

Macro Definition Documentation

#define DEMO_APP_CONFIG_ASSEMBLY_NUM   151

Definition at line 18 of file sampleapplication.c.

Referenced by AfterAssemblyDataReceived(), and ApplicationInitialization().

#define DEMO_APP_EXPLICT_ASSEMBLY_NUM   154
#define DEMO_APP_HEARTBEAT_INPUT_ONLY_ASSEMBLY_NUM   152

Definition at line 19 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_HEARTBEAT_LISTEN_ONLY_ASSEMBLY_NUM   153

Definition at line 20 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_INPUT_ASSEMBLY_NUM   100

Definition at line 16 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_OUTPUT_ASSEMBLY_NUM   150

Definition at line 17 of file sampleapplication.c.

Referenced by AfterAssemblyDataReceived(), and ApplicationInitialization().

Variable Documentation

EipUint8 g_assembly_data064[32]

Definition at line 27 of file sampleapplication.c.

EipUint8 g_assembly_data096[32]

Definition at line 28 of file sampleapplication.c.

EipUint8 g_assembly_data097[10]

Definition at line 29 of file sampleapplication.c.

EipUint8 g_assembly_data09A[32]

Definition at line 30 of file sampleapplication.c.

CipUint g_encapsulation_inactivity_timeout

#13 Number of seconds of inactivity before TCP connection is closed

Currently we implemented with the default value of 120 seconds.

Definition at line 63 of file ciptcpipinterface.c.