Public Member Functions | Private Attributes | List of all members
ClpeSocket Class Reference

#include <ClpeSocket.h>

Inheritance diagram for ClpeSocket:
Inheritance graph
[legend]

Public Member Functions

bool accept (ClpeSocket *new_socket, int mcu_id) const
 
bool bind (const char *host, const int port, int mcu_id)
 
void close (int mcu_id)
 
 ClpeSocket ()
 
bool connect (const string host, const int port, int mcu_id)
 
bool create (int mcu_id)
 
bool is_valid_master () const
 
bool is_valid_slave () const
 
bool listen (int mcu_id) const
 
bool recv (unsigned char *s, int mcu_id) const
 
bool send (unsigned char *s, int mcu_id) const
 
void set_non_blocking (const bool, int mcu_id)
 
virtual ~ClpeSocket ()
 

Private Attributes

sockaddr_in m_addr
 
int m_sock_master
 
int m_sock_slave
 

Detailed Description

Definition at line 24 of file ClpeSocket.h.

Constructor & Destructor Documentation

◆ ClpeSocket()

ClpeSocket::ClpeSocket ( )

Definition at line 12 of file ClpeSocket.cpp.

◆ ~ClpeSocket()

ClpeSocket::~ClpeSocket ( )
virtual

Definition at line 17 of file ClpeSocket.cpp.

Member Function Documentation

◆ accept()

bool ClpeSocket::accept ( ClpeSocket new_socket,
int  mcu_id 
) const

Definition at line 166 of file ClpeSocket.cpp.

◆ bind()

bool ClpeSocket::bind ( const char *  host,
const int  port,
int  mcu_id 
)

Definition at line 95 of file ClpeSocket.cpp.

◆ close()

void ClpeSocket::close ( int  mcu_id)

Definition at line 341 of file ClpeSocket.cpp.

◆ connect()

bool ClpeSocket::connect ( const string  host,
const int  port,
int  mcu_id 
)

Definition at line 268 of file ClpeSocket.cpp.

◆ create()

bool ClpeSocket::create ( int  mcu_id)

Definition at line 30 of file ClpeSocket.cpp.

◆ is_valid_master()

bool ClpeSocket::is_valid_master ( ) const
inline

Definition at line 47 of file ClpeSocket.h.

◆ is_valid_slave()

bool ClpeSocket::is_valid_slave ( ) const
inline

Definition at line 48 of file ClpeSocket.h.

◆ listen()

bool ClpeSocket::listen ( int  mcu_id) const

Definition at line 134 of file ClpeSocket.cpp.

◆ recv()

bool ClpeSocket::recv ( unsigned char *  s,
int  mcu_id 
) const

Definition at line 223 of file ClpeSocket.cpp.

◆ send()

bool ClpeSocket::send ( unsigned char *  s,
int  mcu_id 
) const

Definition at line 192 of file ClpeSocket.cpp.

◆ set_non_blocking()

void ClpeSocket::set_non_blocking ( const bool  b,
int  mcu_id 
)

Definition at line 312 of file ClpeSocket.cpp.

Member Data Documentation

◆ m_addr

sockaddr_in ClpeSocket::m_addr
private

Definition at line 53 of file ClpeSocket.h.

◆ m_sock_master

int ClpeSocket::m_sock_master
private

Definition at line 51 of file ClpeSocket.h.

◆ m_sock_slave

int ClpeSocket::m_sock_slave
private

Definition at line 52 of file ClpeSocket.h.


The documentation for this class was generated from the following files:


clpe_sdk
Author(s): Can-lab Corporation
autogenerated on Wed Oct 12 2022 02:17:28