LimitedRangeChannel

Parent Previous Next

Interfaces and Buses / Wireless_Sensor / Channels / LimitedRangeChannel
Block Name: LimitedRangeChannel


This is a model of a wireless channel with a specified transmission range. The transmission range can be specified in one of two ways. Either it is the value of the range field in the defaultProperties parameter (a record) of this channel, or it is provided by the transmitter on each call to transmit() as a property argument. To use the latter mechanism, it is necessary that the property token be an instance of RecordToken with a field named "range" that can be converted to a double (i.e., it can be a double, an int, or a byte). The default value for range is Infinity, which indicates that by default, there is no range limit.

Any receiver that is within the specified range when transmit() is called will receive the transmission. The distance between the transmitter and receiver is determined by the protected method _distanceBetween(). In this base class, that method uses the _location attribute of the transmit and receive actors, which corresponds to the position of the icon in the ModelBuilder visual editor. Subclasses may override this protected method to provide some other notion of distance.



Created with the Personal Edition of HelpNDoc: Free EBook and documentation generator