CogIOTCPIP ClassCognex VisionPro 9.20
CogIOTCPIP.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.QuickBuild.IO CogIODevice
            Cognex.VisionPro.QuickBuild.Implementation.Internal CogIOTCPIP

Namespace: Cognex.VisionPro.QuickBuild.Implementation.Internal
Assembly: Cognex.VisionPro.QuickBuild.IO (in Cognex.VisionPro.QuickBuild.IO.dll) Version: 80.0.0.0 (80.0.0.0)
Syntax

[SerializableAttribute]
public class CogIOTCPIP : CogIODevice, ICogIOTCPIP

The CogIOTCPIP type exposes the following members.

Constructors

  NameDescription
Public methodCogIOTCPIP(CogIOTCPIP DeviceMode)
Public methodCogIOTCPIP(SerializationInfo, StreamingContext)
Public methodCogIOTCPIP(String, CogIOTCPIP DeviceMode)
Summary description for CogIOTCPIP.
Top
Methods

  NameDescription
Public methodClear 
Clear all items in the queue. Should be called before running all jobs.
Public methodClear(Int32)
Remove all data items in the queue that belongs to a particular job. Call this when Job's shutdown method is called or IOHandler's IOQueueFlush is called
Public methodClose
This function closes the socket and stops transmitting or receiving data immediately. All unsent data will be ignored. Warning: This function should never be called directly. It should only be called from CogIOStreamDeviceManager
(Overrides CogIODevice Close .)
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodEncode
Encode - This method returns the array of bytes, the result when the supplied string is encoded using the currently selected the encoding scheme
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.)
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodIsRunning
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Public methodOnDeserialization
Public methodOpen
This method does everything necessary to establish a valid communication channel with the specified properties. That includes creating the low-level device object (e.g. a socket), ensuring that the output queue is correctly sized and initially empty, and ensuring that the input buffer is empty. This method does nothing if IsDeviceOpen is already true
(Overrides CogIODevice Open .)
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodStop
This API only affects the output processing rather than input. Input can come in even though the output is no longer available.
Public methodStopped
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodWrite(CogIOOutputData) (Overrides CogIODevice Write(CogIOOutputData).)
Public methodWrite(Int32, String)
Call this when more than one job are using the device Returns false when queue overflows
Top
Fields

  NameDescription
Public fieldStatic memberSfClientAutoReconnect
Public fieldStatic memberSfClientType
Public fieldStatic memberSfClose
Public fieldStatic memberSfEnabled
Public fieldStatic memberSfEncoding
Public fieldStatic memberSfHostName
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfOpen
Public fieldStatic memberSfOutputMsgDelimiter
Public fieldStatic memberSfOutputMsgTerminator
Public fieldStatic memberSfOutputOnlyFailedResults
Public fieldStatic memberSfPortNumber
Public fieldStatic memberSfQueueSize
Public fieldStatic memberSfTimeout
Top
Properties

  NameDescription
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.)
Public propertyClientAutoReconnect
Public propertyClientConnectionCount
This function should only be called for the server device type Returns 0 if the server socket has not been created, otherwise, returns the actual number of clients connected.
Public propertyDeviceName
Return the name that characterizes the instance of CogIODevice object.
(Inherited from CogIODevice.)
Public propertyEnabled
Returns true when the device is enabled. This does not mean the device is closed. When the device is disabled, it will neither send nor receive data even though the device is open and the socket is connected.
(Overrides CogIODevice Enabled.)
Public propertyEncoding
This is the encoding type that will be used to convert a queued output string into a sequence of bytes. The default value is ASCII.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyHost
This property identifies the computer to which results will be sent and from which commands will be read. This string may be in the form of an IP address, that is, a 32-bit integer expressed as four 8-bit values separated by periods, such as “127.205.42.9”. When Open() is called, this string will be evaluated to determine if it is in the form of an IP address. If it is then it will be used as such. If not, then we assume that this string is a host name which must be resolved using DNS. There is no default value.
Public propertyIOEnabled
Public propertyIsClientConnected
Returns true if the socket is connected. Should only call this property if the device type is client. Returns false if it is a server device type or the socket has not been created.
Public propertyIsDeviceOpen
Socket must be valid and the data handler thread is valid.
(Overrides CogIODevice IsDeviceOpen.)
Public propertyMode
Returns true if the device is a client type.
Public propertyOutputMessageDelimiter
Public propertyOutputMessageTerminator
Public propertyOutputOnlyFailedResult
When this property is true, it outputs the failed job's results. This means, the I/O queue must contain the job's run status, which is added automatically before a Job starts to run.
Public propertyPortNumber
Public propertyQueueSize
This is the maximum number of outbound strings that can be queued by this device. The default value is 32.
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Public propertyTimeout
This timeout value is used for acknowledgement, sending and receiving data. For Acknowledgment: When AckEnabled is true, this is the maximum number of milliseconds that this device’s output processing thread will wait for an acknowledgement message. If this timeout is exceeded, the output processing thread will retransmit the message. This will be repeated up to AckNumRetries times. If the message is not acknowledged, the output processing thread generates an Error event. For other cases: It will throw a timeout error when it fails to successfully either send or the entire data.
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Public eventClientConnectionChanged
Used only for the client device. This event is fired whenever a server connection is made.
Public eventJobCanStop
Used to indicate that the job can stop as there are no more data to process after Stop is called.
Public eventMessageReceived
This event is fired whenever the device receives an input
Public eventMessageSent
This event is fired whenever the device send an output. This is used to assist a visual indicator
Public eventServerConnectionChanged
Used only for the server device. This event is fired whenever a client connection is added or removed from the server.
Public eventSocketReadError
This event should only be used for the purpose of decoding socket error for TCP/IP.
Public eventSocketWriteError
Top
See Also