This example shows the acd (Address Conflict Detection) implementation for Ethernet/IP.
The IP 192.168.1.12 is set by default
The acd for Ethernet/IP configuration is following:
Define | Value | Description |
---|---|---|
EIP_ACD_PROBE_WAIT | 200ms | initial random delay |
EIP_ACD_PROBE_NUM | 4 | number of probe packets |
EIP_ACD_PROBE_MIN | 200ms | minimum delay until repeated probe |
EIP_ACD_PROBE_MAX | 200ms | maximum delay until repeated probe |
EIP_ACD_ANNOUNCE_WAIT | 200ms | delay before announcing |
EIP_ACD_ANNOUNCE_NUM | 2 | number of Announcement packets |
EIP_ACD_ANNOUNCE_INTERVAL | 2000ms | time between Announcement packets |
EIP_ACD_DEFEND_INTERVAL | 2000ms | minimum interval between defensive ARPs |
EIP_ACD_EIP_ARP_PARSING | GOAL_TRUE | extended parsing of ARP frames for EIP mode |
EIP_ACD_KEEP_ANNOUNCED_IP | GOAL_FALSE | do not release an IP address on conflict if it has been successfully announced |
This example shows how to use acd.
Whether ACD is activated can be checked via the TCP / IP Interface Object - Instance Attributes 10 (SelectAcd)
. This should be on by default. For reasons of compatibility, the acd config variable must also be set in addition to the SelectAcd
attribute.
goal_eipCfgAcdOn(GOAL_TRUE);
During / after the probe process of the IP address, goal_ipProbedCb
is called and it is reported whether the probe process was successful (GOAL_ACD_CB_IP_PROBED)
or not (GOAL_ACD_CB_IP_CONFLICT)
.
If a conflict occurs, information is given at which phase (GOAL_ACD_PROBE_IPV4_ADDRESS, GOAL_ACD_ONGOING_DETECTION, GOAL_ACD_SEMI_ACTIVE_PROBE)
in the probe process the conflict occurred.
The IP address is only ready for use after the probe process has been successful.
If a conflict was detected, the conflict packet can be read out via TCP / IP Interface Object - Instance Attributes 11 (LastConflictDetected)
after a reboot. A reboot is necessary because the device gives up its IP address in the event of a conflict.
This example shows how to use the configuration management.
-
This application changes the value of the CM-Var APPL_CM_VAR_UINT32
and reads it out.
This is a simple LED chase lights application, which uses alternating ascending or descending LED order.
Define | Value | Description |
---|---|---|
GOAL_LEDS_NUM | 8 | number of LEDs |
GOAL_LED_BLINK_TIME_MS | 25 | LED blinks every 25ms |
-
This application basically initializes the Command Line interface (CLI).
The IP 192.168.0.100 is set by default
see Chapter: Command line interface (CLI)
This application tests the reception of cli commands via UDP packets.
The IP 192.168.0.100 is set by default
see Chapter: Command line interface (CLI)
This application demonstrates the integration of device detection.
-
see Chapter: Device Detection (DD)
This application demonstrates the reception of IP, netmask and gateway via DHCP.
-
-
This module implements a basic application that tests the DLR stack without an EtherNet/IP stack. This sample sets up a ring Node that periodically prints its status. You can include this ring node into a DLR ring. However you can not use the CIP services to access this device.
-
-
This module provides an example on usage of the data mapper.
-
-
This application polls all Ethernet statistics and shows changed statistics every second.
-
-
This module shows how to use the GOAL dynamic heap (allocate, copy, verify and free).
-
-
This application runs a simple HTTPS server that hosts a demo HTML page. It can be accessed via web browser by browsing https:// followed by the IP address of the device. Additional it is possible not to use TLS, only by browsing the IP address. In this case another demo html page is shown.
-
-
This application polls the Ethernet interfaces for changes in link state, duplex and speed. If a change is detected, it waits the APPL_ETH_CHANGE_DELAY delay and checks again to avoid flicker.
-
-
This example application basically initializes the board with GOAL running IGMP (Internet Group Management Protocol) snooping.
-
-
This module provides a simple application of goal instance handling.
Define | Value | Description |
---|---|---|
APPL_ID | 0xffff | instances type id |
see Chapter: Generic GOAL instances
This module provides a simple application of linked lists.
-
Make sure the initial list pointer is set to NULL before using it with the GOAL_LL_* API.
This application demonstrates the integration of LM (Message Logger) and example log messages.
Define | Value | Description |
---|---|---|
GOAL_LM_BUFFER_SIZE | 512 | buffer size of message logger |
APPL_DELAY_MS | 100 | loop time |
APPL_STR_LEN | 32 | length of log string |
-
This module demonstrate the handling of GOAL its mailbox MA.
Define | Value | Description |
---|---|---|
APPL_TX_TIME | 1 ms | cycle time for sending messages |
APPL_LOG_TIME | 5 s | cycle time for logging stats |
APPL_FIRST_ID | 0 | start message |
-
This module demonstrate the handling of GOAL its mailbox MA.
Define | Value | Description |
---|---|---|
APPL_TX_TIME | 1 ms | cycle time for sending messages |
APPL_LOG_TIME | 5 s | cycle time for logging stats |
APPL_FIRST_ID | 0 | start message |
-
This module provides a simple micro core to core application using GOAL. This application is used for AC and CC. The application handles cyclic data for the MCTC communication. They contain a local time stamp and an incremental transmission counter, which are transfer to the peer core. Meanwhile, the other core do the same.
Define | Value | Description |
---|---|---|
APPL_LOOP_TIMEOUT | 1 s | application timeout |
APPL_STATUS_TIMEOUT | 5000 ms | application timeout of status log |
The content of received data is compared to the content of the next cyclic data, for determining the delay of communication.
see Micro Core to Core - User Manual
This module provides a simple micro core to core application using GOAL. This application is used for AC and CC. The application handles cyclic data for the MCTC communication. They contain a local time stamp and an incremental transmission counter, which are transfer to the peer core. Meanwhile, the other core do the same.
Define | Value | Description |
---|---|---|
APPL_LOOP_TIMEOUT | 1 s | application timeout |
APPL_STATUS_TIMEOUT | 5000 ms | application timeout of status log |
The content of received data is compared to the content of the next cyclic data, for determining the delay of communication.
see Micro Core to Core - User Manual
This application shows how delay the memory allocation block after GOAL_STAGE_GOAL by getting a delay handle which must be later released.
Define | Value | Description |
---|---|---|
GOAL_APPL_MEM_SIZE | 100 | allocation size |
-
Application template without Ethernet functionality.
-
-
This module provides a simple application of ring buffer usage.
Define | Value | Description |
---|---|---|
RB_SIZE | 128 | ring buffer size |
-
This module provides a simple RPC application using GOAL. The variable A and variable B is transmitted to the server for multiplication. The client receives the result as variable C and checks it.
Define | Value | Description |
---|---|---|
GOAL_RPC_FUNC_TEST | 0 | user function ID |
GOAL_CTC_TX_TIME | 5 s | cycle time for sending messages |
VAR_A | 0x0123 | variable A |
VAR_B | 0x4567 | variable B |
VAR_C | VAR_A * VAR_B | result C |
-
This module provides a simple RPC application using GOAL. The variable A and variable B is transmitted to the server for multiplication. The client receives the result as variable C and checks it.
Define | Value | Description |
---|---|---|
GOAL_RPC_FUNC_TEST | 0 | user function ID |
GOAL_CTC_TX_TIME | 5 s | cycle time for sending messages |
VAR_A | 0x0123 | variable A |
VAR_B | 0x4567 | variable B |
VAR_C | VAR_A * VAR_B | result C |
-
This application demonstrates the initialization and basic usage of the Simple Network Management Protocol (SNMP) with GOAL.
Define | Value | Description |
---|---|---|
APPL_SNMP_ID | 0 | snmp ID |
APPL_ADDR_IP | 192.168.0.50 | IP-Address |
APPL_ADDR_NETMASK | 255.255.255.0 | netmask |
APPL_ADDR_GATEWAY | 0.0.0.0 | gateway |
APPL_ADDR_TRAPSINK | 192.168.150.33 | trapsink |
-
This module provides a simple SPI test for both master and slave. The SPI mode (master/slave) is auto detected by values stored in the SPI MA.
Define | Value | Description |
---|---|---|
GOAL_APPL_SPI_CHANNEL | 0 | spi channel |
GOAL_APPL_SPI_MSG_SIZE | 128 | message size |
GOAL_APPL_TIMER_DELAY | 2 s | time delay |
GOAL_APPL_SPI_MSG_SLAVE_OFFSET_MAX | 10 | slave offset |
The master cyclically sends out data generated by a deterministic function based on the last data sent. The slaves mirrors the data as soon as possible. The deterministic function should be bijective - that means to each argument there is exactly one image and vice versa. Both sides check received data for correctness. The slave directly checks if the alogorthm applied to last master data received leads to current received data. The master checks if the algorithm aplied to received data (zero, one or more times) leads to last sent data. In this case the number of algorithm calls corresponds to the number of SPI frames between master message and slave answer.
This application shows how to set up and use tasks.
Define | Value | Description |
---|---|---|
GOAL_APPL_MAIN_LOOP_TIMER_PERIOD | 5 s | timer period |
GOAL_APPL_TASK_LOOP_SLEEP_DURATION | 5 s | sleep duration |
-
This application shows how to set up and use the locking mechanismn with two tasks.
Define | Value | Description |
---|---|---|
APPL_TASK_ONE_SLEEP | 1 s | first task sleep time |
APPL_TASK_TWO_SLEEP | 1.5 s | second task sleep time |
APPL_TASK_PRIO_HIGH | GOAL_TASK_PRIO_HIGHEST | high priority |
APPL_TASK_PRIO_LOW | GOAL_TASK_PRIO_LOWEST | low priority |
-
This application demonstrates the connection of a TCP client to a TCP server. After establishing a connection to given server a fixed number of test TCP frames will be sent. Then the client will close the connection.
Define | Value | Description |
---|---|---|
MAIN_APPL_TCP_PORT | 1234 | tcp port |
MAIN_APPL_IP | 192.168.0.100 | IP address |
MAIN_APPL_IP_REMOTE | 192.168.0.10 | remote ip address |
MAIN_APPL_NM | 255.255.255.0 | netmask |
MAIN_APPL_GW | 0.0.0.0 | gateway |
GOAL_APPL_RECON_TIME | 1 s | reconnection time |
GOAL_APPL_SEND_INT | 1 s | interval between two sending actions |
GOAL_APPL_SEND_CNT_CLOSE | 5 | number of sending actions before closing |
GOAL_APPL_CNT_REPEAT | 3 | count of repeating this test |
The client waits until a server is found. If the TCP closed the channel (e.g. by timeout) the client tries to reopen it.
This application demonstrates a simple TCP Echo Server.
Define | Value | Description |
---|---|---|
MAIN_APPL_TCP_PORT | 1234 | tcp port |
MAIN_APPL_IP | 192.168.0.10 | IP address |
MAIN_APPL_NM | 255.255.255.0 | netmask |
MAIN_APPL_GW | 0.0.0.0 | gateway |
-
This module provides a simple application template using GOAL.
-
-
This application runs a simple HTTP server that hosts a demo HTML page. It can be accessed via web browser by browsing the IP address of this device. It is possible to use TLS/ HTTPS.
Define | Value | Description | |
---|---|---|---|
APPL_ADDR_IP | 192.168.0.10 | IP address | |
APPL_ADDR_NETMASK | 255.255.255.0 | netmask | |
APPL_ADDR_GATEWAY | 0.0.0.0 | gateway | |
APPL_TCP_PORT | 443 | tcp port | |
HTTP_RESPONSE |
| http response | |
DEBUG_LEVEL | 0 | debug level | |
MAIN_APPL_TLS_CHAN_CNT | 1 | tls channel count |
-
This application demonstrates the activation and handling of the jumbo frame feature if supported by the hardware. This application is based on the udp_receive demo.
Define | Value | Description |
---|---|---|
MAIN_APPL_UDP_PORT | 1234 | udp port |
MAIN_APPL_IP | 192.168.0.10 | IP address |
MAIN_APPL_NM | 255.255.255.0 | netmask |
MAIN_APPL_GW | 0.0.0.0 | gateway |
-
This application demonstrates the reception of UDP packets.
Define | Value | Description |
---|---|---|
MAIN_APPL_UDP_PORT | 1234 | udp port |
MAIN_APPL_IP | 192.168.0.10 | IP address |
MAIN_APPL_NM | 255.255.255.0 | netmask |
MAIN_APPL_GW | 0.0.0.0 | gateway |
-