PU2CLR BK108X Arduino Library 1.0.2
This is an Arduino Library to control the BK108X device
Loading...
Searching...
No Matches
RDS Functions

Functions

char * BK108X::getRdsProgramInformation (void)
 Gets the Program Information (RT - Radio Text)
 
char * BK108X::getRdsStationInformation (void)
 Gets the Station Information.
 
char * BK108X::getRdsStationName (void)
 Gets the Station Name.
 
void BK108X::getRdsStatus ()
 Gets the RDS registers information.
 
void BK108X::setRdsMode (uint8_t rds_mode=0)
 Sets the Rds Mode Standard or Verbose.
 
void BK108X::setRds (bool value)
 Sets the RDS operation.
 
bool BK108X::getRdsReady ()
 Returns true if RDS Ready.
 
uint8_t BK108X::getRdsFlagAB (void)
 Returns the current Text Flag A/B

 
uint16_t BK108X::getRdsGroupType ()
 Return the group type.
 
uint8_t BK108X::getRdsVersionCode (void)
 Gets the version code (extracted from the Block B)
 
uint8_t BK108X::getRdsProgramType (void)
 Returns the Program Type (extracted from the Block B)
 
void BK108X::getNext2Block (char *c)
 Process data received from group 2B.
 
void BK108X::getNext4Block (char *c)
 Process data received from group 2A.
 
char * BK108X::getRdsText (void)
 Gets the RDS Text when the message is of the Group Type 2 version A.
 
char * BK108X::getRdsText0A (void)
 Gets the station name and other messages.
 
char * BK108X::getRdsText2A (void)
 Gets the Text processed for the 2A group.
 
char * BK108X::getRdsText2B (void)
 Gets the Text processed for the 2B group.
 
char * BK108X::getRdsTime ()
 Gets the RDS time and date when the Group type is 4.
 
char * BK108X::getRdsLocalTime ()
 Gets the RDS time converted to local time.
 
bool BK108X::getRdsSync ()
 Get the Rds Sync.
 
void BK108X::clearRdsBuffer ()
 Clear RDS Information (Station Name, Station Information, Program Information and Time)
 

Detailed Description

RDS/RBDS

Function Documentation

◆ getRdsProgramInformation()

char * BK108X::getRdsProgramInformation ( void  )
inline

Gets the Program Information (RT - Radio Text)

@

Process the program information data. Same getRdsText2A(). It is a alias for getRdsText2A.

ATTENTION: You must call getRdsReady before calling this function.

Returns
char array with the program information (63 bytes)
See also
getRdsText2A

Definition at line 1108 of file BK108X.h.

References BK108X::getRdsText2A().

◆ getRdsStationInformation()

char * BK108X::getRdsStationInformation ( void  )
inline

Gets the Station Information.

ATTENTION: You must call getRdsReady before calling this function.

Returns
char array with the Text of Station Information (33 bytes)
See also
getRdsReady

Definition at line 1117 of file BK108X.h.

References BK108X::getRdsText2B().

◆ getRdsStationName()

char * BK108X::getRdsStationName ( void  )
inline

Gets the Station Name.

Alias for getRdsText0A

ATTENTION: You must call getRdsReady before calling this function.

Returns
char* should return a string with the station name. However, some stations send other kind of messages
See also
getRdsText0A

Definition at line 1127 of file BK108X.h.

References BK108X::getRdsText0A().

◆ getRdsStatus()

void BK108X::getRdsStatus ( )

Gets the RDS registers information.

Gets the value of the registers from 0x0A to 0x0F

This function also updates the value of shadowRegisters[0];

Returns
bk_reg0a

Definition at line 1058 of file BK108X.cpp.

◆ setRdsMode()

void BK108X::setRdsMode ( uint8_t  rds_mode = 0)

Sets the Rds Mode Standard or Verbose.

Parameters
rds_mode0 = Standard (default); 1 = Verbose

Definition at line 1069 of file BK108X.cpp.

◆ setRds()

void BK108X::setRds ( bool  value)

Sets the RDS operation.

Enable or Disable the RDS

Parameters
true= turns the RDS ON; false = turns the RDS OFF

Definition at line 1081 of file BK108X.cpp.

Referenced by BK108X::setRDS().

◆ getRdsReady()

bool BK108X::getRdsReady ( )

Returns true if RDS Ready.

Read addresses 0Ah, 0Ch, and check the bit RDSR.

If in verbose mode, the BLERA bits indicate how many errors were corrected in block A. If BLERA indicates 6 or more errors, the data in RDSA should be discarded.

When using the polling method, it is best not to poll continuously. The data will appear in intervals of ~88 ms and the RDSR indicator will be available for at least 40 ms, so a polling rate of 40 ms or less should be sufficient.

ATTENTION: You must call this function before calling any RDS function to process data

Returns
true or false

Definition at line 1098 of file BK108X.cpp.

◆ getRdsFlagAB()

uint8_t BK108X::getRdsFlagAB ( void  )

Returns the current Text Flag A/B

You must call getRdsReady before calling this function

Returns
uint8_t current Text Flag A/B

Definition at line 1117 of file BK108X.cpp.

◆ getRdsGroupType()

uint16_t BK108X::getRdsGroupType ( )

Return the group type.

You must call getRdsReady before calling this function

Returns
uint16_t

Definition at line 1128 of file BK108X.cpp.

◆ getRdsVersionCode()

uint8_t BK108X::getRdsVersionCode ( void  )

Gets the version code (extracted from the Block B)

You must call getRdsReady before calling this function

Returns
0=A or 1=B

Definition at line 1142 of file BK108X.cpp.

◆ getRdsProgramType()

uint8_t BK108X::getRdsProgramType ( void  )

Returns the Program Type (extracted from the Block B)

<>

You must call getRdsReady before calling this function

See also
https://en.wikipedia.org/wiki/Radio_Data_System
Returns
program type (an integer betwenn 0 and 31)

Definition at line 1156 of file BK108X.cpp.

◆ getNext2Block()

void BK108X::getNext2Block ( char *  c)

Process data received from group 2B.

Todo:
to be implemented
Parameters
cchar array reference to the "group 2B" text

Definition at line 1170 of file BK108X.cpp.

Referenced by BK108X::getRdsText0A(), and BK108X::getRdsText2B().

◆ getNext4Block()

void BK108X::getNext4Block ( char *  c)

Process data received from group 2A.

Todo:
to be implemented
Parameters
cchar array reference to the "group 2A" text

Definition at line 1205 of file BK108X.cpp.

Referenced by BK108X::getRdsText2A().

◆ getRdsText()

char * BK108X::getRdsText ( void  )

Gets the RDS Text when the message is of the Group Type 2 version A.

Returns
char* The string (char array) with the content (Text) received from group 2A

Definition at line 1240 of file BK108X.cpp.

◆ getRdsText0A()

char * BK108X::getRdsText0A ( void  )

Gets the station name and other messages.

Todo:
RDS Dynamic PS or Scrolling PS support
Returns
char* should return a string with the station name. However, some stations send other kind of messages

Definition at line 1253 of file BK108X.cpp.

References BK108X::getNext2Block(), and BK108X::rds_buffer0A.

Referenced by BK108X::getRdsStationName().

◆ getRdsText2A()

char * BK108X::getRdsText2A ( void  )

Gets the Text processed for the 2A group.

@

Returns
char* string with the Text of the group A2

Definition at line 1282 of file BK108X.cpp.

References BK108X::getNext4Block(), and BK108X::rds_buffer2A.

Referenced by BK108X::getRdsProgramInformation().

◆ getRdsText2B()

char * BK108X::getRdsText2B ( void  )

Gets the Text processed for the 2B group.

Returns
char* string with the Text of the group AB

Definition at line 1309 of file BK108X.cpp.

References BK108X::getNext2Block(), and BK108X::rds_buffer2B.

Referenced by BK108X::getRdsStationInformation().

◆ getRdsTime()

char * BK108X::getRdsTime ( )

Gets the RDS time and date when the Group type is 4.

Returns
char* a string with hh:mm +/- offset

Definition at line 1333 of file BK108X.cpp.

References BK108X::rds_time.

◆ getRdsLocalTime()

char * BK108X::getRdsLocalTime ( )

Gets the RDS time converted to local time.

Todo:
Need to check.

ATTENTION: You must call getRdsReady before calling this function.

ATTENTION: Some stations broadcast wrong time.

Returns
char* a string with hh:mm
See also
getRdsReady

Definition at line 1398 of file BK108X.cpp.

References BK108X::rds_time.

◆ getRdsSync()

bool BK108X::getRdsSync ( )

Get the Rds Sync.

Returns true if RDS currently synchronized.

Returns
true or false

Definition at line 1462 of file BK108X.cpp.

◆ clearRdsBuffer()

void BK108X::clearRdsBuffer ( )

Clear RDS Information (Station Name, Station Information, Program Information and Time)

Clear the buffer with latest RDS information

Definition at line 1472 of file BK108X.cpp.

References BK108X::rds_buffer0A, BK108X::rds_buffer2A, BK108X::rds_buffer2B, and BK108X::rds_time.