MetisDiscovery Class Reference


Overview


MetisDiscovery is used by the Metis object to discover Metis hardware on the network. Unless you have a special need, and have multiple Metis devices on the same network, you will usually not need to interface directly with MetisDiscovery. The MetisDiscovery API is included here for reference only.


Tasks


Creating a MetisDiscovery object

- init


Discovering Metis Hardware

- discover:
-
count


Obtain a Metis object

- metisDevice:


Network

- networkInterfaces
-
hostPort




Instance Methods


count:

Returns the same count that is returned from a -discover call.

- (int)count

Return Value

The number of Metis devices found on the after a -discover call.




metisDevice:

Returns one of the Metis objects that is created by -discover.

- (Metis*)metisDevice:(int)index

Parameters

index
index of the Metis object. This is a value between 0 and [ metisDiscovery count ]-1.

Return Value

The number of Metis devices found on the after a -discover call.




discover:

This method looks for Metis hardware in the given NetworkInterface. MetisDiscovery creates a Metis object for each device that is found and returns the number of Metis devices that are found on that network.

The caller can then use the
-metisDevice call to get a particular Metis object to connect to the device.

- (int)discover:(NetworkInterface*)network

Parameters

network
a NetworkInterface object.

Return Value

The number of Metis devices found on the given network.




hostPort


Returns the port the computer uses to initiate Metis discovery.

As of August 2014, a bug in Metis' firmware causes the firmware's
programmer functions to respond to the computer port that is used to broadcast a discovery packet, instead of responding to the computer port that initiates a programmer command (e.g., EEPROM erase).

Starting with Metis Framework v2.5, Metis.m's -init method uses the MetisDiscovery hostPort method to set the UDP port Metis.m uses.

- (int)hostPort

Return Value

The port number.




init

When MetisDiscovery is initialized, it creates a NetworkInterfaces object. The NetworkInterfaces object supplies MetisDiscovery with all accessible networks on the computer . The -discover call can then be directed to one of these Networkinterface.

- (id)init

Return Value

An initialized MetisDiscovery object.




networkInterfaces

Returns a NetworkInterfaces object.

- (NetworkInterfaces*)networkInterfaces

Return Value

NetworkInterfaces object.