B4J Programming Press on the image to return to the main documentation page.

rWire

List of types:

WireMaster
WireSlave

WireMaster


Events:

None

Members:


  Initialize As void

  RequestFrom (Address As Byte, Length As Byte) As Byte()

  WriteTo (Address As Byte, Data() As Byte) As Byte

  WriteTo2 (Address As Byte, SendStop As Boolean, Data() As Byte) As Byte

Members description:

Initialize As void
Initializes the WireMaster object.
RequestFrom (Address As Byte, Length As Byte) As Byte()
Requests data from a slave and returns it as an array of bytes.
This will return the data prepared by the slave with the call to SetDataForMater.
Note that the returned array length might be smaller than the requested length.
Address - Slave address.
Length - Number of bytes requested.
WriteTo (Address As Byte, Data() As Byte) As Byte
Sends the given array to the slave.
WriteTo2 (Address As Byte, SendStop As Boolean, Data() As Byte) As Byte
Similar to WriteTo.
SendStop - Whether to send a stop at the end (default is true).

WireSlave


Events:

NewData (Data() As Byte)

Members:


  Initialize (Address As Byte, NewDataSub As SubVoidArray) As void

  SetDataForMaster (Data() As Byte) As void

Members description:

Initialize (Address As Byte, NewDataSub As SubVoidArray) As void
Initializes the WireSlave object.
Address - The slave address. Must be between 8 to 127.
NewDataSub - Sub that will handle the NewData event.
SetDataForMaster (Data() As Byte) As void
Sets the data that will be sent to the master when the master will call RequestFrom.
Top