Class EasyLinkController
- Namespace
- nanoFramework.TI.EasyLink
- Assembly
- nanoFramework.TI.EasyLink.dll
The CC13xx/CC26xx EasyLink API is a simple abstraction layer on top of the CC13xx/CC26xx RF Driver and is intended as a starting point for developers creating a proprietor Sub1G protocol.
public sealed class EasyLinkController : IDisposable
- Inheritance
-
EasyLinkController
- Implements
- Inherited Members
- Extension Methods
Remarks
The EasyLink layer does not support any regional RF conformance such as 'Listen Before Talk' required for the license free frequency band. Customers need to add support for the regional conformance that their product requires under the EasyLink API.
Constructors
EasyLinkController(PhyType)
Initializes the radio with specified Phy settings.
public EasyLinkController(PhyType phyTYpe)
Parameters
Properties
AbsoluteTime
Absolute radio time. This can be used for monitoring or Tx and Rx events using the AbsoluteTime field from TransmitPacket or ReceivedPacket.
public uint AbsoluteTime { get; }
Property Value
- uint
Absolute radio time.
Frequency
Gets the radio frequency in units of kHz. The returned frequency is value set in the Frequency Synthesizer and may not be exactly the same that was set.
public uint Frequency { get; }
Property Value
Remarks
This value does not include any offsets for deviations due to factors such as temperature and hence this API should not be used to get an accurate measure of frequency.
IeeeAddress
Gets the IEEE address.
public byte[] IeeeAddress { get; }
Property Value
- byte[]
IsInitialized
Provides information if the EasyLink layer has been successfully initialized by calling Initialize().
public bool IsInitialized { get; }
Property Value
PhyType
public PhyType PhyType { get; }
Property Value
RfPower
Gets the Tx Power in dBm.
public sbyte RfPower { get; }
Property Value
Remarks
This value does not include any offsets for deviations due to factors such as temperature and hence this API should not be used to get an accurate measure of frequency.
Rssi
RSSI value of an ongoing radio operation. It is useful in receiver test modes to detect the presence of both modulated and unmodulated carrier waves.
public sbyte Rssi { get; }
Property Value
- sbyte
Signed RSSI value (dBm)e.
Remarks
If no RSSI is available the return value is -128.
Methods
AddAddressToFilter(byte[])
Add an address to the receive address filter. Any packet received for an address that is not in the filter will be discarded. Addresses are entered as byte array.
public void AddAddressToFilter(byte[] address)
Parameters
address
byte[]
Remarks
If the address is already on the list it won't be added.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Finalize()
protected override void Finalize()
GetConfiguration(ControlOption)
Gets the current value of an advanced configuration option.
public uint GetConfiguration(ControlOption option)
Parameters
option
ControlOptionThe control option to get.
Returns
- uint
The control option value.
Initialize()
Initializes the EsayLink layer.
public Status Initialize()
Returns
- Status
The operation result.
Receive(out ReceivedPacket)
Waits for packet to be received. This method blocks execution of the current thread until a packet is received.
public Status Receive(out ReceivedPacket packet)
Parameters
packet
ReceivedPacketThe received packet.
Returns
- Status
The operation result.
Receive(out ReceivedPacket, TimeSpan)
Waits for packet to be received.
This method blocks execution of the current thread until a packet is received.
If no packet is receive before the timeout
expires an Exception is thrown.
public Status Receive(out ReceivedPacket packet, TimeSpan timeout)
Parameters
packet
ReceivedPacketThe received packet.
timeout
TimeSpanThe timeout value for the reception operation to complete successfully.
Returns
- Status
The operation result.
RemoveAddressFromFilter(byte[])
Removes an address from the receive address filter.
public void RemoveAddressFromFilter(byte[] address)
Parameters
address
byte[]
Remarks
If the address is not on the filter list no error will be returned.
SetConfiguration(ControlOption, uint)
Sets advanced configuration options.
public Status SetConfiguration(ControlOption option, uint value)
Parameters
option
ControlOptionThe control option to be set.
value
uintThe value to set the control option to.
Returns
- Status
The operation result.
SetFrequency(uint)
Sets the radio frequency in units of kHz. When setting the radio frequency the value will be rounded to the nearest frequency supported by the frequency synthesizer.
public Status SetFrequency(uint frequency)
Parameters
frequency
uint
Returns
Remarks
In order to set the frequency the EasyLink layer has to have been previously initialized with Initialize().
SetRfPower(sbyte)
Sets the Tx Power in dBm. Accepted values range from -20 to 20 dBm, depending on the platform. All platforms other than the CC1352P: Value of -10 dBm or values in the range of 0-14 dBm are accepted. Values above 14 are set to 14 dBm while those below 0 are set to -10 dBm. CC1352P Default PA: -20 to 14 dBm. Values above 14 dBm will be set to 14 dBm, while values below -20 dBm will cause a configuration error. CC1352P High PA: 14 to 20 dBm. Values above 20 dBm will be set to 20 dBm, while values below 14 dBm will cause a configuration error.
public Status SetRfPower(sbyte rfPower)
Parameters
rfPower
sbyte
Returns
Remarks
In order to set the Tx Power the EasyLink layer has to have been previously initialized with Initialize(). The PA mode is chosen at build time, run-time switching from high PA to default PA (or vice versa) is not supported.
Transmit(TransmitPacket)
Sends a Packet with blocking call. This method blocks execution of the current thread until the packet transmission in complete.
public Status Transmit(TransmitPacket packet)
Parameters
packet
TransmitPacketThe TransmitPacket to be transmitted.
Returns
- Status
The operation result.
Transmit(TransmitPacket, TimeSpan)
Sends a Packet. This method blocks execution of the current thread until the packet transmission in complete.
public Status Transmit(TransmitPacket packet, TimeSpan timeout)
Parameters
packet
TransmitPacketThe TransmitPacket to be transmitted.
timeout
TimeSpanThe timeout value for the transmission operation to complete successfully.
Returns
- Status
The operation result.
Transmit(TransmitPacket, TimeSpan, TimeSpan)
Sends a Packet. This method blocks execution of the current thread until the packet transmission in complete.
public Status Transmit(TransmitPacket packet, TimeSpan timeout, TimeSpan dueTime)
Parameters
packet
TransmitPacketThe TransmitPacket to be transmitted.
timeout
TimeSpanThe timeout value (in milliseconds) for the transmission operation to complete successfully.
dueTime
TimeSpanThe amount of time to delay before starting the transmission, in milliseconds. Specify zero (0) to start the timer immediately.
Returns
- Status
The operation result.