44#include <kaydaradef.h>
49 #define FBSDK_DLL K_DLLIMPORT
54#ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {
62#define FBCOMMPORT_DEFAULT_BLOCKING_TIMEOUT 500
105 bool Read(
void* lpBuffer,
int nNumberOfBytesToRead,
int* lpNumberOfBytesRead=NULL );
123 bool Write(
void* lpBuffer,
int nNumberOfBytesToWrite,
int *lpNumberOfBytesWritten=NULL );
169 virtual int Add (
int pItem );
194#define FBTCPIP_DEFAULT_BLOCKING_TIMEOUT 500
219 bool Read(
int pSocket,
void* lpBuffer,
int nNumberOfBytesToRead,
int* lpNumberOfBytesRead=NULL );
241 bool ReadDatagram(
int pSocket,
void* lpBuffer,
int nNumberOfBytesToRead,
int* lpNumberOfBytesRead=NULL, kULong* pAddr=NULL,
unsigned short *pPort=NULL );
250 bool Write(
int pSocket,
void* lpBuffer,
int nNumberOfBytesToWrite,
int* lpNumberOfBytesWritten=NULL );
272 bool WriteDatagram(
int pSocket,
void* lpBuffer,
int nNumberOfBytesToWrite,
int* lpNumberOfBytesToWrite, kULong pAddr,
unsigned short pPort );
289 bool Bind(
int &pSocket, kULong pAddr ,
int pPort=0 );
297 bool Connect(
int &pSocket,
char *pAddr,
int pPort );
310 int Listen(
int pSocket,
int pBackLog=1 );
317 int Accept(
int pSocket, kULong *pOutAddr=NULL );
327 int Select(
int pSocket,
bool pTestRead,
bool pTestWrite,
bool pTestError, kULong pTimeOutMilisecond=0 );
330#ifdef FBSDKUseNamespace
FBPropertyInt ByteSize
Property: Byte size.
bool WriteBlocking(void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesWritten=NULL, kULong pTimeOut=500)
Write data to comm port (blocking).
bool EmptyBuffer()
Empty comm port buffer.
bool ReadBlocking(void *lpBuffer, int nNumberOfBytesToRead, int *lpNumberOfBytesRead=NULL, kULong pTimeOut=500)
Read data from comm port (blocking).
bool Read(void *lpBuffer, int nNumberOfBytesToRead, int *lpNumberOfBytesRead=NULL)
Read data from comm port (non-blocking).
FBPropertyInt PortNumber
Property: Port number.
FBPropertyParity Parity
Property: Parity.
FBPropertyCommPortType CommPortType
Property: Comm type (physical, virtual or internal)?
bool Write(void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesWritten=NULL)
Write data to comm port (non-blocking).
FBPropertyRSType RSType
Property: Communications protocol (RS232 or RS422)?
FBPropertyInt StopBits
Property: Stop bits.
FBPropertyString OwnerName
Property: Owner name.
FBPropertyBool Active
Property: Is comm port active?
FBPropertyBool UseHardwareFC
Property: Use hardware flow control?
FBPropertyInt BaudRate
Property: Baud rate.
MotionBuilder SDK base class.
virtual void RemoveAt(int pIndex)
Remove the comm port at pIndex.
virtual int operator[](int pIndex)
Get the comm port at pIndex.
virtual int Add(int pItem)
Add a commport to the property list.
virtual int GetCount()
Get the number of comm ports recognized.
virtual int Remove(int pItem)
Remove Comm Port pItem from property list.
Property class: const char * (String).
int Select(int pSocket, bool pTestRead, bool pTestWrite, bool pTestError, kULong pTimeOutMilisecond=0)
Test socket status.
bool WriteBlocking(int pSocket, void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesToWrite=NULL, kULong pTimeOut=500)
Write data to a network socket (blocking)
bool Bind(int &pSocket, kULong pAddr, int pPort=0)
Bind a socket to an address.
bool ReadDatagram(int pSocket, void *lpBuffer, int nNumberOfBytesToRead, int *lpNumberOfBytesRead=NULL, kULong *pAddr=NULL, unsigned short *pPort=NULL)
Read datagram from a network socket.
bool CreateSocket(int &pSocket, FBTCPIPSocketType pType, const char *pProtocol="ip", bool pNonBlocking=true)
Create a network socket.
bool WriteDatagram(int pSocket, void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesToWrite, kULong pAddr, unsigned short pPort)
Write a datagram to a network socket.
bool Read(int pSocket, void *lpBuffer, int nNumberOfBytesToRead, int *lpNumberOfBytesRead=NULL)
Read data from a network socket (non-blocking)
bool ReadBlocking(int pSocket, void *lpBuffer, int nNumberOfBytesToRead, int *lpNumberOfBytesRead=NULL, kULong pTimeOut=500)
Read data from a network socket (blocking).
int Accept(int pSocket, kULong *pOutAddr=NULL)
Accepts incoming port access.
bool Write(int pSocket, void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesWritten=NULL)
Write data to a network socket (non-blocking)
bool CloseSocket(int &pSocket)
Close a network socket.
bool Connect(int &pSocket, char *pAddr, int pPort)
Connect to address pAddr, port pPort with socket pSocket.
int Listen(int pSocket, int pBackLog=1)
Place socket in mode to receive data.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
@ kFBParityOdd
Odd parity.
@ kFBParityEven
Even parity.
@ kFBParityNone
No parity.
#define FBCOMMPORT_DEFAULT_BLOCKING_TIMEOUT
FBCOMMPORT_DEFAULT_BLOCKING_TIMEOUT.
FBCommPortType
Communication port type.
class K_DLLIMPORT FBPropertyBaseList< int > FBPropertyBaseListInt
typedef class FBSDK_DLL FBPropertyBaseList< int > FBPropertyBaseListInt
FBRSType
RS type for serial port.
@ kFBRS232
RS-232 serial protocol.
@ kFBRS422
RS-422 serial protocol.
#define FBTCPIP_DEFAULT_BLOCKING_TIMEOUT
FBTCPIP_DEFAULT_BLOCKING_TIMEOUT define.
FBTCPIPSocketType
Types of TCP/IP Sockets.
@ kFBTCPIP_RAW
Raw data (TCP).
@ kFBTCPIP_DGRAM
Datagrams (UDP).
@ kFBTCPIP_Stream
Streaming data (TCP).
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.