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 "opener_api.h"
#include "appcontype.h"
#include <string.h>
#include <stdlib.h>
Include dependency graph for sampleapplication.c:

Go to the source code of this file.

Macros

#define DEMO_APP_CONFIG_ASSEMBLY_NUM   1
 
#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 *pa_pstInstance)
 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 pa_unOutputAssembly, unsigned int pa_unInputAssembly, IoConnectionEvent pa_eIOConnectionEvent)
 Inform the application on changes occurred for a connection. More...
 
void * CipCalloc (size_t pa_nNumberOfElements, size_t pa_nSizeOfElement)
 Allocate memory for the CIP stack. More...
 
void CipFree (void *pa_poData)
 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 pa_nRunIdleValue)
 Inform the application that the Run/Idle State has been changed by the originator. More...
 

Variables

EipUint8 g_assembly_data064 [40]
 
EipUint8 g_assembly_data096 [40]
 
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   1

Definition at line 14 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 15 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_HEARTBEAT_LISTEN_ONLY_ASSEMBLY_NUM   153

Definition at line 16 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_INPUT_ASSEMBLY_NUM   100

Definition at line 12 of file sampleapplication.c.

Referenced by ApplicationInitialization().

#define DEMO_APP_OUTPUT_ASSEMBLY_NUM   150

Definition at line 13 of file sampleapplication.c.

Referenced by AfterAssemblyDataReceived(), and ApplicationInitialization().

Variable Documentation

EipUint8 g_assembly_data064[40]

Definition at line 23 of file sampleapplication.c.

Referenced by AfterAssemblyDataReceived(), and ApplicationInitialization().

EipUint8 g_assembly_data096[40]

Definition at line 24 of file sampleapplication.c.

Referenced by AfterAssemblyDataReceived(), and ApplicationInitialization().

EipUint8 g_assembly_data097[10]

Definition at line 25 of file sampleapplication.c.

Referenced by ApplicationInitialization().

EipUint8 g_assembly_data09A[32]

Definition at line 26 of file sampleapplication.c.

Referenced by ApplicationInitialization().

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.

Referenced by ResetDeviceToInitialConfiguration().