CogIOTCPIP.
Inheritance Hierarchy
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: 73.0.0.0 (73.0.0.0)
Syntax
The CogIOTCPIP type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogIOTCPIP(CogIOTCPIP DeviceMode) | ||
| CogIOTCPIP(SerializationInfo, StreamingContext) | ||
| CogIOTCPIP(String, CogIOTCPIP DeviceMode) |
Summary description for CogIOTCPIP.
|
Methods
| Name | Description | |
|---|---|---|
| Clear |
Clear all items in the queue. Should be called before running all jobs.
| |
| Clear(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
| |
| Close |
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 .) | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Encode |
Encode - This method returns the array of bytes, the result when the
supplied string is encoded using the currently selected the encoding
scheme
| |
| Equals | (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData |
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| IsRunning | ||
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(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.) | |
| OnDeserialization | ||
| Open |
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 .) | |
| ResumeAndRaiseChangedEvent |
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.) | |
| Stop |
This API only affects the output processing rather than input.
Input can come in even though the output is no longer available.
| |
| Stopped | ||
| SuspendChangedEvent |
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.) | |
| ToString | (Inherited from Object.) | |
| Write(CogIOOutputData) | (Overrides CogIODevice Write(CogIOOutputData).) | |
| Write(Int32, String) |
Call this when more than one job are using the device
Returns false when queue overflows
|
Fields
| Name | Description | |
|---|---|---|
| SfClientAutoReconnect | ||
| SfClientType | ||
| SfClose | ||
| SfEnabled | ||
| SfEncoding | ||
| SfHostName | ||
| SfNextSf | ||
| SfOpen | ||
| SfOutputMsgDelimiter | ||
| SfOutputMsgTerminator | ||
| SfOutputOnlyFailedResults | ||
| SfPortNumber | ||
| SfQueueSize | ||
| SfTimeout |
Properties
| Name | Description | |
|---|---|---|
| ChangedEventSuspended |
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.) | |
| ClientAutoReconnect | ||
| ClientConnectionCount |
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.
| |
| DeviceName |
Return the name that characterizes the instance of CogIODevice object.
(Inherited from CogIODevice.) | |
| Enabled |
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.) | |
| Encoding |
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.
| |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| Host |
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.
| |
| IOEnabled | ||
| IsClientConnected |
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.
| |
| IsDeviceOpen |
Socket must be valid and the data handler thread is valid.
(Overrides CogIODevice IsDeviceOpen.) | |
| Mode |
Returns true if the device is a client type.
| |
| OutputMessageDelimiter | ||
| OutputMessageTerminator | ||
| OutputOnlyFailedResult |
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.
| |
| PortNumber | ||
| QueueSize |
This is the maximum number of outbound strings that can be queued by this
device.
The default value is 32.
| |
| StateFlags |
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.) | |
| Timeout |
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.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| ClientConnectionChanged |
Used only for the client device. This event is fired whenever
a server connection is made.
| |
| JobCanStop |
Used to indicate that the job can stop as
there are no more data to process after Stop is called.
| |
| MessageReceived |
This event is fired whenever the device receives an input
| |
| MessageSent |
This event is fired whenever the device send an output.
This is used to assist a visual indicator
| |
| ServerConnectionChanged |
Used only for the server device. This event is fired whenever
a client connection is added or removed from the server.
| |
| SocketReadError |
This event should only be used for the purpose of decoding socket error
for TCP/IP.
| |
| SocketWriteError |
See Also