|
| | Transceiver (TransceiverType type, TransceiverCallback callback) throws InvalidProfileException |
| |
|
TransceiverType | getType () |
| |
| void | transmit (Tone tone) throws InvalidTonePayloadException, TransceiverNotRegisteredException |
| |
| void | transmit (ArrayList< Tone > tones) throws InvalidTonePayloadException, TransceiverNotRegisteredException |
| |
| void | beacon (Tone tone) throws InvalidTonePayloadException, TransceiverNotRegisteredException, BeaconNotPermittedException |
| |
| void | clear () throws TransceiverNotRegisteredException |
| |
| boolean | isEmpty () throws TransceiverNotRegisteredException |
| |
|
int | getMaxPayloadSizeBytes () |
| |
◆ Transceiver()
Constructor for the Transceiver object. After construction, the Transceiver must be registered with a valid Radius object in order for tones to be received or transmitted.
- Parameters
-
| type | The type of Transceiver to create (determines transmit/receive types) (must be non-null) |
| callback | The implemented TransceiverCallback interface that will be invoked by this Transceiver (must be non-null) |
- Exceptions
-
◆ beacon()
Continuously broadcast a tone. To end the beacon, perform any of the following:
- Call clear() – will allow active beacon Tone to finish. Transceiver.onTransmitterEmpty and Transceiver.onTransmitComplete will be called after final beacon
- Call transmit() – will allow active beacon Tone to finish. Transceiver.onTransmitComplete will happen after final beacon, Transceiver.onTransmitterEmpty will be called after the tone(s) provided to transmit()
- Call Radius.unregisterTransceiver() or Radius.unregisterAll() – will preempt active beacon Tone. Transceiver.onTransmitterEmpty and Transceiver.onTransmitComplete will not be called
- Parameters
-
| tone | The tone to use as a beacon |
- Exceptions
-
- Note
- beacon() can only be called when no other Transceiver objects are registered to the Radius object.
-
calling beacon() while beaconing is active will allow the currently transmitting beacon tone to complete, followed by the beacon tone being changed over to the tone passed in on the most recent call to beacon()
-
Transceiver.onTransmitComplete will be called upon every successful transmission of a beacon tone
-
Transceiver.onTransmitterEmpty will not be called unless the beacon is stopped by either calling clear() or transmit()
◆ clear()
Remove all remaining Tone objects for this Transceiver that have not yet been transmitted.
- Exceptions
-
- Note
- This does not interrupt an active transmission of a Tone.
◆ isEmpty()
Determine if the Transceiver has any Tone objects queued.
- Exceptions
-
- Returns
- true if Transceiver has no tones queued, false if it does
◆ transmit() [1/2]
Transmit a list of Tones. Tones will be transmitted in the order they are presented in the provided list. If the associated Radius object has any Tone objects queued or is actively transmitting, the Tone is queued for transmission.
- Parameters
-
| tones | List of Tones to be transmitted (must be non-null) |
- Exceptions
-
- Note
- If com.lisnr.radius.exceptions.InvalidTonePayloadException is thrown, none of the provided Tones will be transmitted.
-
If the Transceiver is currently beaconing, calling transmit() will stop the beacon while allowing the active beacon tone to finish transmitting.
◆ transmit() [2/2]
Transmit a single Tone. If the associated Radius object has any Tone objects queued or is actively transmitting, the Tone is queued for transmission.
- Parameters
-
| tone | Tone to be transmitted (must be non-null) |
- Exceptions
-
- Note
- If the Transceiver is currently beaconing, calling transmit() will stop the beacon while allowing the active beacon tone to finish transmitting.
-
calling beacon() while beaconing is active will allow the currently transmitting beacon tone to complete, followed by the beacon tone being changed over to the tone passed in on the most recent call to beacon()
-
Transceiver.onTransmitComplete will be called upon every successful transmission of a beacon tone
The documentation for this class was generated from the following file: