|
LibDMRConf
0.5.0
A library to program DMR radios.
|
Represents a digital contact within the binary codeplug. More...
#include <d878uv_codeplug.hh>
Public Types | |
| enum | CallType { CALL_PRIVATE = 0, CALL_GROUP = 1, CALL_ALL = 2 } |
| Possible call types. More... | |
| enum | AlertType { ALERT_NONE = 0, ALERT_RING = 1, ALERT_ONLINE = 2 } |
| Possible ring-tone types. More... | |
Public Member Functions | |
| contact_t () | |
| Constructs a new and empty contact. | |
| void | clear () |
| Clears the contact. | |
| bool | isValid () const |
Returns true if the contact is valid. | |
| DigitalContact::Type | getType () const |
| Retruns the call type. | |
| void | setType (DigitalContact::Type type) |
| Sets the call type. | |
| QString | getName () const |
| Returns the name of the contact. | |
| void | setName (const QString &name) |
| Sets the name of the contact. | |
| uint32_t | getId () const |
| Returns the number of the contact. | |
| void | setId (uint32_t id) |
| Set the number of the contact. | |
| bool | getAlert () const |
Retunrs true if a ring-tone is enabled for this contact. | |
| void | setAlert (bool enable) |
| Enables/disables a ring-tone for this contact. | |
| DigitalContact * | toContactObj () const |
Assembles a DigitalContact from this contact. | |
| void | fromContactObj (const DigitalContact *contact) |
Constructs this contact from the give DigitalContact. | |
Public Attributes | |
| uint8_t | type |
| Call Type: Group Call, Private Call or All Call. | |
| uint8_t | name [16] |
| Contact Name max 16 ASCII chars 0-terminated. | |
| uint8_t | _unused17 [18] |
| Unused, set to 0. | |
| uint32_t | id |
| Call ID, BCD coded 8 digits, little-endian. | |
| uint8_t | call_alert |
| Call Alert. One of None, Ring, Online Alert. | |
| uint8_t | _unused40 [60] |
| Unused, set to 0. | |
Represents a digital contact within the binary codeplug.
Memmory layout of encoded contact (100byte):
0 8 16 24 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 00 | Type | Name 16 x ASCII chars ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 10 ... | 18 unused bytes set to 0 ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 20 ... | ID 8 digits BCD encoded ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 24 ... | Call alert | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 28 | 60 unused bytes, set to 0 ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 60 ... | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1.8.17