MotoHawk Ethernet Adapter Definition

Declares an adapter which will be added to the embedded Ethernet stack and be made available for client and server operations.

Block ID

Ethernet Adapter Definition

Library

motohawk_ethernet_lib

Description

This block configures the Ethernet protocol stack to be properly connected to an Ethernet network. The network settings can be supplied directly in this block, and some parameters can also be sourced by a reference to an existing MotoHawk data store declared elsewhere in the model. If this is selected, this block performs cross checks for data type and dimension as required. Note that the data store values are latched upon startup. A running change to the data store values will not take affect until then startup event of the hardware.

Block Parameters

Setup Tab

Parameter Field Values Comments/Description
Network Stack Reference Single quote enclosed alphanumeric The name of Network Stack Definition block that this block applies to.
Adapter Name Single quote enclosed alphanumeric A unique name that identifies this adapter instance. Must be C-legal.
Resource Drop-down list Module resource.

Address Tab

Parameter Field Values Comments/Description
Hostname Source Dropdown Selects between specifying the Hostname by the parameters dialog or by Data Store reference
Hostname Single quote enclosed alphanumeric Module hostname label, only visible if "Constant" is selected for Hostname Source.

A DNS server is required on the network that has been configured with this hostname when the IP address is statically assigned.

When the IP is dynamically assigned (DHCP) the client will pass this hostname to the DHCP server to register it with the associated DNS server.

The control will auto-generate a unique hostname when the hostname is an empty string (i.e. '' or []). The auto-generated hostname will be of the form Name<MACID> where the <MACID> is a hexadecimal text representation of the 6 byte MAC address (using the specified separator) unique to the adapter. Name will use the Hostname Prefix unless it is an empty string (i.e. '' or []), in which case the Adapter Name and an underscore will be used (Name_<MACID>).
Generated Hostname Prefix Single quote enclosed alphanumeric Specifies the prefix of the autogenerated hostname.

Only visible when Hostname is an empty string (i.e. '' or []) and "Constant" was chosen for Hostname Source.
Generated Hostname MAC Address Separator Single quote enclosed alphanumeric Specifies the separator to be used for the MACID in the autogenerated name.

Only visible when Hostname is an empty string (i.e. '' or []) and "Constant" was chosen for Hostname Source.
Hostname Data Store Reference Alpha-numeric text Specifies an existing max length of 50 uint8 array data store name.
Adapter Address Assignment Dropdown of:
'DHCP'
'Static'
'Lookup by Data Store Reference'
IP address assignment type.

When DHCP is selected a DHCP client is started and will request an address to a DHCP server on the local network.

When Static is selected, the user must supply at least the IP Address and a Subnet Mask. The Default Gateway and DNS server addresses are optional.

When Lookup by Data Store Reference is selected, a specified data store will evaluate to "zero = DHCP" and "non-zero = Static".
Adapter Address Assignment Data Store Reference Alpha-numeric text Specifies an existing scalar data store name of any data type. Runtime evaluation of the data store selects between "zero = DHCP" and "non-zero = Static".

Only visible when the Adapter Address Assignment is selected as "Lookup by Data Store Reference."
IP Address Source Dropdown Selects between specifying the IP Address by the parameters dialog or by Data Store reference
IP Address Single quote enclosed alpha-numeric text in IPv4 x.x.x.x format where x is in the range 0-255. Adapter IP Address. Only visible when "Constant" is chosen for IP Address Source.
Example: '192.168.1.2'
IP Address Data Store Reference Alpha-numeric text Specifies an existing array of 4 uint8 data store name. Only visible when "Data Store Reference" is chosen for IP Address Source.
Example: 'eth0_Static_IP' where the MotoHawk data store by this name has initializer uint8([192 168 1 2])
Subnet Mask Source Dropdown Selects between specifying the Subnet Mask by the parameters dialog or by Data Store reference
Subnet Mask Single quote enclosed alpha-numeric text in IPv4 x.x.x.x format where x is in the range 0-255. Adapter Subnet Mask. Only visible when "Constant" is chosen for Subnet Mask Source.
Example: '255.255.255.0'
Subnet Mask Data Store Reference Alpha-numeric text Specifies an existing array of 4 uint8 data store name. Only visible when "Data Store Reference" is chosen for Subnet Mask Source.
Example: 'eth0_Subnet_Mask' where the MotoHawk data store by this name has initializer uint8([255 255 255 0])
Default Gateway Source Dropdown Selects between specifying the Gateway IP Address by the parameters dialog or by Data Store reference
Default Gateway Single quote enclosed alpha-numeric text in IPv4 x.x.x.x format where x is in the range 0-255. Adapter Default Gateway. Only visibile when "Constant" is chosen for Default Gateway Source.
Example: '192.168.1.1'
Default Gateway Data Store Reference Alpha-numeric text Specifies an existing array of 4 uint8 data store name. Only visible when "Data Store Reference" is chosen for Default Gateway Source.
Example: 'eth0_Default_Gateway' where the MotoHawk data store by this name has initializer uint8([192 168 1 1])
Primary DNS Source Dropdown Selects between specifying the Primary DNS IP Address by the parameters dialog or by Data Store reference
Primary DNS Single quote enclosed alpha-numeric text in IPv4 x.x.x.x format where x is in the range 0-255. Primary Domain Name Server. Only visible when "Constant" is chosen for Primary DNS Source.
Example: '8.8.8.8'
Primary DNS Data Store Reference Alpha-numeric text Specifies an existing array of 4 uint8 data store name. Only visible when "Data Store Reference" is chosen for Primary DNS Source.
Example: 'eth0_Primary_DNS' where the MotoHawk data store by this name has initializer uint8([8 8 8 8])
Secondary DNS Source Dropdown Selects between specifying the Secondary DNS IP Address by the parameters dialog or by Data Store reference
Secondary DNS Single quote enclosed alpha-numeric text in IPv4 x.x.x.x format where x is in the range 0-255. Secondary Domain Name Server. Only visible when "Constant" is chosen for Secondary DNS Source.
Example: '8.8.4.4'
Secondary DNS Data Store Reference Alpha-numeric text Specifies an existing array of 4 uint8 data store name. Only visible when "Data Store Reference" is chosen for Secondary DNS Source.
Example: 'eth0_Secondary_DNS' where the MotoHawk data store by this name has initializer uint8([8 8 4 4])

Adapter Setup Tab

The Adapter Setup tab contains adapter specific configuration and will change based on the kind of adapter selected

"MPC5xxx Fast Ethernet Controller"
Specific Parameters
Values Comments/Description
Specify RX/TX Task names Check Box (enable) The Ethernet stack implicitly creates dynamic tasks to handle RX and TX. This option allows the names of these tasks to be specified, which will allow, amongst other things, task attributes to be queried based upon these names.
Transmit Task name Single quote enclosed alpha-numeric. The name that will be associated with the transmit task. Must be C-legal.
Receive Task name Single quote enclosed alpha-numeric. The name that will be associated with the receive task. Must be C-legal.
Expose RX/TX Task metrics to Instrumentation Check Box (enable) It is possible, once the task names are specified, to access task info directly, which makes the automatic capture of metric information superfluous. This option allows the developer to specify whether the block set should still capture such metrics.

"Serial Line IP"
Specific Parameters
Values Comments/Description
Serial Definition Reference Single quote enclosed alpha-numeric. The reference name to a serial definition block that will be used to transmit and receive serial line IP data.