CIRCT  20.0.0git
Public Member Functions | Private Member Functions | List of all members
esiaccel.types.WritePort Class Reference
Inheritance diagram for esiaccel.types.WritePort:
Inheritance graph
[legend]
Collaboration diagram for esiaccel.types.WritePort:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, BundlePort owner, cpp.WriteChannelPort cpp_port)
 
bool write (self, msg=None)
 
bool try_write (self, msg=None)
 
- Public Member Functions inherited from esiaccel.types.Port
def __init__ (self, BundlePort owner, cpp.ChannelPort cpp_port)
 
def connect (self, Optional[int] buffer_size=None)
 
def disconnect (self)
 

Private Member Functions

bytearray __serialize_msg (self, msg=None)
 

Additional Inherited Members

- Public Attributes inherited from esiaccel.types.Port
 owner
 
 cpp_port
 
 type
 

Detailed Description

A unidirectional communication channel from the host to the accelerator.

Definition at line 312 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

def esiaccel.types.WritePort.__init__ (   self,
BundlePort  owner,
cpp.WriteChannelPort  cpp_port 
)

Definition at line 315 of file types.py.

References esiaccel.types.Port.cpp_port, and esiaccel.types.BundlePort.cpp_port.

Member Function Documentation

◆ __serialize_msg()

bytearray esiaccel.types.WritePort.__serialize_msg (   self,
  msg = None 
)
private

◆ try_write()

bool esiaccel.types.WritePort.try_write (   self,
  msg = None 
)
Like 'write', but uses the non-blocking tryWrite method of the underlying
    port. Returns True if the write was successful, False otherwise.

Definition at line 334 of file types.py.

References esiaccel.types.WritePort.__serialize_msg(), esiaccel.types.Port.cpp_port, and esiaccel.types.BundlePort.cpp_port.

◆ write()

bool esiaccel.types.WritePort.write (   self,
  msg = None 
)
Write a typed message to the channel. Attempts to serialize 'msg' to what
    the accelerator expects, but will fail if the object is not convertible to
    the port type.

Definition at line 327 of file types.py.

References esiaccel.types.WritePort.__serialize_msg(), esiaccel.types.Port.cpp_port, and esiaccel.types.BundlePort.cpp_port.


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