1 /* 2 * 3 * Copyright 2001-2011 Texas Instruments, Inc. - http://www.ti.com/ 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.ti.jfm.core; 19 20 import java.util.HashMap; //import com.ti.jbtl.core.*; 21 import com.ti.jfm.core.*; 22 23 /** Class for providing connection with JFmTxNative.cpp module */ 24 25 public class JFmTx { 26 27 private static final String TAG = "JFmTx"; 28 29 private ICallback callback = null; 30 31 private static JFmContext txContext; 32 33 /** Hash table to store JFmContext handles based upon JFmTx. */ 34 private static HashMap<JFmContext, JFmTx> mTxContextsTable = new HashMap<JFmContext, JFmTx>(); 35 36 /** Events path */ 37 38 static { 39 try { 40 // JFmLog.i(TAG, "Loading libfmradio.so"); 41 // System.loadLibrary("fmradio"); 42 nativeJFmTx_ClassInitNative(); 43 } 44 catch (UnsatisfiedLinkError ule) { 45 JFmLog.e(TAG, "WARNING: Could not load libfmradio.so"); 46 } 47 catch (Exception e) { 48 JFmLog.e("JFmRx", "Exception during NativeJFmRx_ClassInitNative (" 49 + e.toString() + ")"); 50 } 51 } 52 53 54 public interface ICallback { 55 56 /* Fm TX call backs */ 57 void fmTxCmdEnable(JFmTx context, JFmTxStatus status, long value); 58 59 void fmTxCmdDisable(JFmTx context, JFmTxStatus status, long value); 60 61 void fmTxCmdDestroy(JFmTx context, JFmTxStatus status, long value); 62 63 void fmTxCmdTune(JFmTx context, JFmTxStatus status, long value); 64 65 void fmTxCmdGetTunedFrequency(JFmTx context, JFmTxStatus status, long value); 66 67 void fmTxCmdStartTransmission(JFmTx context, JFmTxStatus status/* 68 * , 69 * JFmCcmVacUnavailResourceList 70 * ccmVacUnavailResourceList 71 */); 72 73 void fmTxCmdStopTransmission(JFmTx context, JFmTxStatus status, long value); 74 75 void fmTxCmdSetPowerLevel(JFmTx context, JFmTxStatus status, long value); 76 77 void fmTxCmdGetPowerLevel(JFmTx context, JFmTxStatus status, long value); 78 79 void fmTxCmdEnableRds(JFmTx context, JFmTxStatus status, long value); 80 81 void fmTxCmdDisableRds(JFmTx context, JFmTxStatus status, long value); 82 83 // void fmTxCmdDone(JFmTx context, JFmTxStatus status, long value); 84 void fmTxCmdSetRdsTransmissionMode(JFmTx context, JFmTxStatus status, long value); 85 86 void fmTxCmdGetRdsTransmissionMode(JFmTx context, JFmTxStatus status, long value); 87 88 void fmTxCmdSetMonoStereoMode(JFmTx context, JFmTxStatus status, long value); 89 90 void fmTxCmdGetMonoStereoMode(JFmTx context, JFmTxStatus status, long value); 91 92 void fmTxCmdSetPreEmphasisFilter(JFmTx context, JFmTxStatus status, long value); 93 94 void fmTxCmdGetPreEmphasisFilter(JFmTx context, JFmTxStatus status, long value); 95 96 void fmTxCmdSetMuteMode(JFmTx context, JFmTxStatus status, long value); 97 98 void fmTxCmdGetMuteMode(JFmTx context, JFmTxStatus status, long value); 99 100 void fmTxCmdSetRdsAfCode(JFmTx context, JFmTxStatus status, long value); 101 102 void fmTxCmdGetRdsAfCode(JFmTx context, JFmTxStatus status, long value); 103 104 void fmTxCmdSetRdsPiCode(JFmTx context, JFmTxStatus status, long value); 105 106 void fmTxCmdGetRdsPiCode(JFmTx context, JFmTxStatus status, long value); 107 108 void fmTxCmdSetRdsPtyCode(JFmTx context, JFmTxStatus status, long value); 109 110 void fmTxCmdGetRdsPtyCode(JFmTx context, JFmTxStatus status, long value); 111 112 void fmTxCmdSetRdsTextRepertoire(JFmTx context, JFmTxStatus status, long value); 113 114 void fmTxCmdGetRdsTextRepertoire(JFmTx context, JFmTxStatus status, long value); 115 116 void fmTxCmdSetRdsPsDisplayMode(JFmTx context, JFmTxStatus status, long value); 117 118 void fmTxCmdGetRdsPsDisplayMode(JFmTx context, JFmTxStatus status, long value); 119 120 void fmTxCmdSetRdsPsScrollSpeed(JFmTx context, JFmTxStatus status, long value); 121 122 // void fmTxCmdGetRdsPsScrollSpeed(JFmTx context, JFmTxStatus status, 123 // long value); 124 void fmTxCmdSetRdsTextRtMsg(JFmTx context, JFmTxStatus status, int msgType, int msgLen, 125 byte[] msg); 126 127 void fmTxCmdGetRdsTextRtMsg(JFmTx context, JFmTxStatus status, int msgType, int msgLen, 128 byte[] msg); 129 130 void fmTxCmdSetRdsTransmittedMask(JFmTx context, JFmTxStatus status, long value); 131 132 void fmTxCmdGetRdsTransmittedMask(JFmTx context, JFmTxStatus status, long value); 133 134 void fmTxCmdSetRdsTextPsMsg(JFmTx context, JFmTxStatus status, int msgLen, byte[] msg); 135 136 void fmTxCmdGetRdsTextPsMsg(JFmTx context, JFmTxStatus status, int msgLen, byte[] msg); 137 138 void fmTxCmdSetRdsTrafficCodes(JFmTx context, JFmTxStatus status, int taCode, int tpCode); 139 140 void fmTxCmdGetRdsTrafficCodes(JFmTx context, JFmTxStatus status, int taCode, int tpCode); 141 142 void fmTxCmdSetRdsMusicSpeechFlag(JFmTx context, JFmTxStatus status, long value); 143 144 void fmTxCmdGetRdsMusicSpeechFlag(JFmTx context, JFmTxStatus status, long value); 145 146 // void fmTxCmdSetRdsECC(JFmTx context, JFmTxStatus status, long value); 147 void fmTxCmdChangeAudioSource(JFmTx context, JFmTxStatus status, 148 JFmCcmVacUnavailResourceList ccmVacUnavailResourceList); 149 150 // void fmTxCmdChangeDigitalSourceConfiguration(JFmTx context, 151 // JFmTxStatus status, JFmCcmVacUnavailResourceList 152 // ccmVacUnavailResourceList); 153 void fmTxCmdSetInterruptMask(JFmTx context, JFmTxStatus status, long value); 154 155 void fmTxCmdWriteRdsRawData(JFmTx contextValue, JFmTxStatus status, int len, byte[] msg); 156 157 void fmTxCmdReadRdsRawData(JFmTx contextValue, JFmTxStatus status, int len, byte[] msg); 158 159 void fmTxCmdSetRdsPsDisplaySpeed(JFmTx contextValue, JFmTxStatus status, long value); 160 161 void fmTxCmdGetRdsPsDisplaySpeed(JFmTx contextValue, JFmTxStatus status, long value); 162 163 void fmTxCmdSetRdsExtendedCountryCode(JFmTx contextValue, JFmTxStatus status, long value); 164 165 void fmTxCmdGetRdsExtendedCountryCode(JFmTx contextValue, JFmTxStatus status, long value); 166 167 void fmTxCmdChangeDigitalAudioConfiguration(JFmTx contextValue, JFmTxStatus status, 168 long value); 169 170 void fmTxCmdSetRdsPsDispalyMode(JFmTx contextValue, JFmTxStatus status, long value); 171 172 void fmTxCmdGetRdsPsDispalyMode(JFmTx contextValue, JFmTxStatus status, long value); 173 174 } 175 176 /** 177 * Datatype Classes 178 */ 179 180 public static class JFmTxRdsPiCode { 181 private int value = 0; 182 183 public JFmTxRdsPiCode(int val) { 184 this.value = val; 185 } 186 187 public int getValue() { 188 return value; 189 } 190 } 191 192 public static enum JFmTxEcalResource implements IJFmEnum<Integer> { 193 194 CAL_RESOURCE_I2SH(0x00), CAL_RESOURCE_PCMH(0x01), CAL_RESOURCE_PCMT_1(0x02), CAL_RESOURCE_PCMT_2( 195 0x03), CAL_RESOURCE_PCMT_3(0x04), CAL_RESOURCE_PCMT_4(0x05), CAL_RESOURCE_PCMT_5( 196 0x06), CAL_RESOURCE_PCMT_6(0x07), CAL_RESOURCE_FM_ANALOG(0x08), CAL_RESOURCE_LAST_EL_RESOURCE( 197 0x08), CAL_RESOURCE_PCMIF(0x09), CAL_RESOURCE_FMIF(0x0A), CAL_RESOURCE_CORTEX(0x0B), CAL_RESOURCE_FM_CORE( 198 0x0C), CAL_RESOURCE_MAX_NUM(0x0D), CAL_RESOURCE_INVALID(0x0E); 199 200 private final int ecalResource; 201 202 private JFmTxEcalResource(int ecalResource) { 203 this.ecalResource = ecalResource; 204 } 205 206 public Integer getValue() { 207 return ecalResource; 208 } 209 } 210 211 public static enum JFmTxEcalOperation implements IJFmEnum<Integer> { 212 213 CAL_OPERATION_FM_TX(0x00), CAL_OPERATION_FM_RX(0x01), CAL_OPERATION_A3DP(0x02), CAL_OPERATION_BT_VOICE( 214 0x03), CAL_OPERATION_WBS(0x04), CAL_OPERATION_AWBS(0x05), CAL_OPERATION_FM_RX_OVER_SCO( 215 0x06), CAL_OPERATION_FM_RX_OVER_A3DP(0x07), CAL_OPERATION_MAX_NUM(0x08), CAL_OPERATION_INVALID( 216 0x09); 217 218 private final int ecalOperation; 219 220 private JFmTxEcalOperation(int ecalOperation) { 221 this.ecalOperation = ecalOperation; 222 } 223 224 public Integer getValue() { 225 return ecalOperation; 226 } 227 } 228 229 public static enum JFmTxEcalSampleFrequency implements IJFmEnum<Integer> { 230 CAL_SAMPLE_FREQ_8000(0x00), CAL_SAMPLE_FREQ_11025(0x01), CAL_SAMPLE_FREQ_12000(0x02), CAL_SAMPLE_FREQ_16000( 231 0x03), CAL_SAMPLE_FREQ_22050(0x04), CAL_SAMPLE_FREQ_24000(0x05), CAL_SAMPLE_FREQ_32000( 232 0x06), CAL_SAMPLE_FREQ_44100(0x07), CAL_SAMPLE_FREQ_48000(0x08); 233 234 private final int ecalSampleFreq; 235 236 private JFmTxEcalSampleFrequency(int ecalSampleFreq) { 237 this.ecalSampleFreq = ecalSampleFreq; 238 } 239 240 public Integer getValue() { 241 return ecalSampleFreq; 242 } 243 } 244 245 public static enum JFmTxRdsSystem implements IJFmEnum<Integer> { 246 FM_RDS_SYSTEM_RDS(0x00), FM_RDS_SYSTEM_RBDS(0x01); 247 248 private final int rdsSystem; 249 250 private JFmTxRdsSystem(int rdsSystem) { 251 this.rdsSystem = rdsSystem; 252 } 253 254 public Integer getValue() { 255 return rdsSystem; 256 } 257 } 258 259 public static enum JFmTxAudioRouteMask implements IJFmEnum<Integer> { 260 261 FMC_AUDIO_ROUTE_MASK_I2S(0x00000001), FMC_AUDIO_ROUTE_MASK_ANALOG(0x00000002), FMC_AUDIO_ROUTE_MASK_NONE( 262 0x00000000), FMC_AUDIO_ROUTE_MASK_ALL(0x00000003); 263 264 private final int audioRouteMask; 265 266 private JFmTxAudioRouteMask(int audioRouteMask) { 267 this.audioRouteMask = audioRouteMask; 268 } 269 270 public Integer getValue() { 271 return audioRouteMask; 272 } 273 } 274 275 public static class JFmTxPowerLevel { 276 277 private int jFmTxPowerLevel; 278 279 public JFmTxPowerLevel(int jFmTxPowerLevel) { 280 this.jFmTxPowerLevel = jFmTxPowerLevel; 281 } 282 283 public int getvalue() { 284 return jFmTxPowerLevel; 285 } 286 287 public void setvalue(int jFmTxPowerLevel) { 288 this.jFmTxPowerLevel = jFmTxPowerLevel; 289 } 290 } 291 292 public static class JFmTxFreq { 293 294 private long value = 0; 295 296 public JFmTxFreq(long value) { 297 this.value = value; 298 } 299 300 public long getValue() { 301 return value; 302 } 303 304 public void setValue(long value) { 305 this.value = value; 306 } 307 } 308 309 public static enum JFmTxMuteMode implements IJFmEnum<Integer> { 310 FMC_MUTE(0x00), FMC_NOT_MUTE(0x01), FMC_ATTENUATE(0x02); 311 312 private final int muteMode; 313 314 private JFmTxMuteMode(int muteMode) { 315 this.muteMode = muteMode; 316 } 317 318 public Integer getValue() { 319 return muteMode; 320 } 321 } 322 323 /* 324 * public static enum JFmTxAudioTargetMask implements IJFmEnum<Integer> { 325 * FM_RX_TARGET_MASK_INVALID(0), FM_RX_TARGET_MASK_I2SH(1), 326 * FM_RX_TARGET_MASK_PCMH(2), FM_RX_TARGET_MASK_FM_OVER_SCO(4), 327 * FM_RX_TARGET_MASK_FM_OVER_A3DP(8), FM_RX_TARGET_MASK_FM_ANALOG(16); 328 * private final int audioTargetMask; private JFmTxAudioTargetMask(int 329 * audioTargetMask) { this.audioTargetMask = audioTargetMask; } public 330 * Integer getValue() { return audioTargetMask; } } public static enum 331 * JFmTxRfDependentMuteMode implements IJFmEnum<Integer> { 332 * FM_RX_RF_DEPENDENT_MUTE_ON(0x01), FM_RX_RF_DEPENDENT_MUTE_OFF(0x00); 333 * private final int rfDependentMuteMode; private 334 * JFmTxRfDependentMuteMode(int rfDependentMuteMode) { 335 * this.rfDependentMuteMode = rfDependentMuteMode; } public Integer 336 * getValue() { return rfDependentMuteMode; } } 337 */ 338 339 public static enum JFmTxMonoStereoMode implements IJFmEnum<Integer> { 340 FM_TX_MONO(0x00), FM_TX_STEREO(0x01); 341 342 private final int monoStereoModer; 343 344 private JFmTxMonoStereoMode(int monoStereoModer) { 345 this.monoStereoModer = monoStereoModer; 346 } 347 348 public Integer getValue() { 349 return monoStereoModer; 350 } 351 } 352 353 public static enum JFmTxEmphasisFilter implements IJFmEnum<Integer> { 354 FM_RX_EMPHASIS_FILTER_NONE(0x00), FM_RX_EMPHASIS_FILTER_50_USEC(0x01), FM_RX_EMPHASIS_FILTER_75_USEC( 355 0x02); 356 357 private final int emphasisFilter; 358 359 private JFmTxEmphasisFilter(int emphasisFilter) { 360 this.emphasisFilter = emphasisFilter; 361 } 362 363 public Integer getValue() { 364 return emphasisFilter; 365 } 366 } 367 368 public static enum JFmTxRepertoire implements IJFmEnum<Integer> { 369 FMC_RDS_REPERTOIRE_G0_CODE_TABLE(0x00), FMC_RDS_REPERTOIRE_G1_CODE_TABLE(0x01), FMC_RDS_REPERTOIRE_G2_CODE_TABLE( 370 0x02); 371 372 private final int repertoire; 373 374 private JFmTxRepertoire(int repertoire) { 375 this.repertoire = repertoire; 376 } 377 378 public Integer getValue() { 379 return repertoire; 380 } 381 } 382 383 public static enum JFmTxRdsTransmissionMode implements IJFmEnum<Integer> { 384 RDS_TRANSMISSION_MANUAL(0x00), RDS_TRANSMISSION_AUTOMATIC(0x01); 385 386 private final int rdsTransmissionMode; 387 388 private JFmTxRdsTransmissionMode(int rdsTransmissionMode) { 389 this.rdsTransmissionMode = rdsTransmissionMode; 390 } 391 392 public Integer getValue() { 393 return rdsTransmissionMode; 394 } 395 } 396 397 public static class JFmTxRdsPtyCode { 398 399 private int rdsPtyCode = 0; 400 401 public JFmTxRdsPtyCode(int rdsPtyCode) { 402 this.rdsPtyCode = rdsPtyCode; 403 } 404 405 public int getValue() { 406 return rdsPtyCode; 407 } 408 409 public void setValue(int rdsPtyCode) { 410 this.rdsPtyCode = rdsPtyCode; 411 } 412 } 413 414 public static enum JFmMusicSpeechFlag implements IJFmEnum<Integer> { 415 FMC_RDS_SPEECH(0x00), FMC_RDS_MUSIC(0x01); 416 417 private final int musicSpeechFlag; 418 419 private JFmMusicSpeechFlag(int musicSpeechFlag) { 420 this.musicSpeechFlag = musicSpeechFlag; 421 } 422 423 public Integer getValue() { 424 return musicSpeechFlag; 425 } 426 } 427 428 public static enum JFmTaCode implements IJFmEnum<Integer> { 429 FMC_RDS_TA_OFF(0x00), FMC_RDS_TA_ON(0x01); 430 431 private final int taCode; 432 433 private JFmTaCode(int taCode) { 434 this.taCode = taCode; 435 } 436 437 public Integer getValue() { 438 return taCode; 439 } 440 } 441 442 public static enum JFmTpCode implements IJFmEnum<Integer> { 443 FMC_RDS_TP_OFF(0x00), FMC_RDS_TP_ON(0x01); 444 445 private final int tpCode; 446 447 private JFmTpCode(int tpCode) { 448 this.tpCode = tpCode; 449 } 450 451 public Integer getValue() { 452 return tpCode; 453 } 454 } 455 456 public static enum JFmRdsRtMsgType implements IJFmEnum<Integer> { 457 FMC_RDS_TEXT_TYPE_PS(0x01), FMC_RDS_TEXT_TYPE_AUTO(0x02), FMC_RDS_TEXT_TYPE_A(0x03), FMC_RDS_TEXT_TYPE_B( 458 0x04); 459 460 private final int msgType; 461 462 private JFmRdsRtMsgType(int msgType) { 463 this.msgType = msgType; 464 } 465 466 public Integer getValue() { 467 return msgType; 468 } 469 } 470 471 public static enum JFmRdsPsDisplayMode implements IJFmEnum<Integer> { 472 FMC_RDS_PS_DISPLAY_MODE_STATIC(0x00), FMC_RDS_PS_DISPLAY_MODE_SCROLL(0x01); 473 474 private final int displayMode; 475 476 private JFmRdsPsDisplayMode(int displayMode) { 477 this.displayMode = displayMode; 478 } 479 480 public Integer getValue() { 481 return displayMode; 482 } 483 } 484 485 /******************************************************************************* 486 * Class Methods 487 *******************************************************************************/ 488 489 /* Fm Tx */ 490 491 public JFmTxStatus txCreate(ICallback callback) { 492 JFmTxStatus jFmTxStatus; 493 494 JFmLog.i(TAG, " nativeJFmTx_create()-Entered "); 495 496 try { 497 498 txContext = new JFmContext(); 499 500 JFmLog.d(TAG, "Calling nativeJFmTx_Create"); 501 int fmStatus = nativeJFmTx_Create(txContext); 502 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, fmStatus); 503 JFmLog.d(TAG, "After nativeJFmTx_Create, status = " + jFmTxStatus.toString() 504 + ", txContext = " + txContext.getValue()); 505 506 /** 507 *Record the caller's callback and returned native context for 508 * nativeJFmTx_create 509 */ 510 511 this.callback = callback; 512 mTxContextsTable.put(txContext, this); 513 514 } catch (Exception e) { 515 JFmLog.e(TAG, "create: exception during nativeJFmTx_create (" + e.toString() + ")"); 516 jFmTxStatus = JFmTxStatus.FAILED; 517 } 518 519 return jFmTxStatus; 520 } 521 522 public JFmTxStatus txDestroy() { 523 JFmLog.i(TAG, "txDestroy: entered"); 524 JFmTxStatus jFmTxStatus; 525 526 try { 527 int fmStatus = nativeJFmTx_Destroy(txContext.getValue()); 528 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, fmStatus); 529 JFmLog.d(TAG, "After nativeJFmTx_Destroy, status = " + jFmTxStatus.toString()); 530 531 /* 532 * Remove a pair of JFmContext-JFmTx related to the destroyed 533 * context from the HashMap 534 */ 535 536 mTxContextsTable.remove(txContext); 537 538 } catch (Exception e) { 539 JFmLog.e(TAG, "txDestroy: exception during nativeJFmTx_Destroy (" + e.toString() + ")"); 540 jFmTxStatus = JFmTxStatus.FAILED; 541 } 542 543 JFmLog.d(TAG, "txDestroy: exiting"); 544 545 return jFmTxStatus; 546 547 } 548 549 public JFmTxStatus txEnable() { 550 JFmLog.d(TAG, "txEnable: entered"); 551 JFmTxStatus jFmTxStatus; 552 553 try { 554 int fmStatus = nativeJFmTx_Enable(txContext.getValue()); 555 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, fmStatus); 556 JFmLog.d(TAG, "After nativeJFmTx_Enable, status = " + jFmTxStatus.toString()); 557 } catch (Exception e) { 558 JFmLog.e(TAG, "txEnable: exception during nativeJFmTx_Enable (" + e.toString() + ")"); 559 jFmTxStatus = JFmTxStatus.FAILED; 560 } 561 JFmLog.d(TAG, "txEnable: exiting"); 562 563 return jFmTxStatus; 564 565 } 566 567 public JFmTxStatus txDisable() { 568 JFmLog.d(TAG, "txDisable: entered"); 569 570 JFmTxStatus jFmTxStatus; 571 572 try { 573 int status = nativeJFmTx_Disable(txContext.getValue()); 574 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 575 JFmLog.d(TAG, "After nativeJFmTx_Disable, status = " + jFmTxStatus.toString()); 576 } catch (Exception e) { 577 JFmLog.e(TAG, "txDisable: exception during nativeJFmTx_Disable (" + e.toString() + ")"); 578 jFmTxStatus = JFmTxStatus.FAILED; 579 } 580 JFmLog.d(TAG, "txDisable: exiting"); 581 return jFmTxStatus; 582 } 583 584 public JFmTxStatus txTune(JFmTxFreq jfmTxFreq) { 585 586 JFmLog.d(TAG, "txTune: entered"); 587 588 JFmTxStatus jFmTxStatus; 589 590 try { 591 592 int status = nativeJFmTx_Tune(txContext.getValue(), jfmTxFreq.getValue()); 593 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 594 JFmLog.d(TAG, "After nativeJFmTx_Tune, status = " + jFmTxStatus.toString()); 595 } catch (Exception e) { 596 JFmLog.e(TAG, "txTune: exception during nativeJFmTx_Tune (" + e.toString() + ")"); 597 jFmTxStatus = JFmTxStatus.FAILED; 598 } 599 JFmLog.d(TAG, "txTune: exiting"); 600 return jFmTxStatus; 601 } 602 603 public JFmTxStatus txGetTunedFrequency() { 604 605 JFmLog.d(TAG, "txGetTunedFrequency: entered"); 606 607 JFmTxStatus jFmTxStatus; 608 609 try { 610 611 int status = nativeJFmTx_GetTunedFrequency(txContext.getValue()); 612 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 613 JFmLog.d(TAG, "After nativeJFmTx_Tune, status = " + jFmTxStatus.toString()); 614 } catch (Exception e) { 615 JFmLog.e(TAG, "txGetTunedFrequency: exception during nativeJFmTx_Tune (" + e.toString() 616 + ")"); 617 jFmTxStatus = JFmTxStatus.FAILED; 618 } 619 JFmLog.d(TAG, "txGetTunedFrequency: exiting"); 620 return jFmTxStatus; 621 } 622 623 public JFmTxStatus txStartTransmission() { 624 JFmLog.d(TAG, "txStartTransmission: entered"); 625 626 JFmTxStatus jFmTxStatus; 627 628 try { 629 int status = nativeJFmTx_StartTransmission(txContext.getValue()); 630 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 631 JFmLog 632 .d(TAG, "After nativeJFmTx_StartTransmission, status = " 633 + jFmTxStatus.toString()); 634 } catch (Exception e) { 635 JFmLog.e(TAG, "disable: exception during nativeJFmTx_StartTransmission (" 636 + e.toString() + ")"); 637 jFmTxStatus = JFmTxStatus.FAILED; 638 } 639 JFmLog.d(TAG, "txStartTransmission: exiting"); 640 return jFmTxStatus; 641 } 642 643 public JFmTxStatus txStopTransmission() { 644 JFmLog.d(TAG, "txStopTransmission: entered"); 645 646 JFmTxStatus jFmTxStatus; 647 648 try { 649 int status = nativeJFmTx_StopTransmission(txContext.getValue()); 650 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 651 JFmLog.d(TAG, "After nativeJFmTx_StopTransmission, status = " + jFmTxStatus.toString()); 652 } catch (Exception e) { 653 JFmLog.e(TAG, "txStopTransmission: exception during nativeJFmTx_StopTransmission (" 654 + e.toString() + ")"); 655 jFmTxStatus = JFmTxStatus.FAILED; 656 } 657 JFmLog.d(TAG, "txStopTransmission: exiting"); 658 return jFmTxStatus; 659 } 660 661 public JFmTxStatus txSetPowerLevel(JFmTxPowerLevel jFmTxPowerLevel) { 662 JFmLog.d(TAG, "txSetPowerLevel: entered"); 663 664 JFmTxStatus jFmTxStatus; 665 666 try { 667 int status = nativeJFmTx_SetPowerLevel(txContext.getValue(), jFmTxPowerLevel.getvalue()); 668 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 669 JFmLog.d(TAG, "After nativeJFmnativeJFmTx_SetPowerLevel, status = " 670 + jFmTxStatus.toString()); 671 } catch (Exception e) { 672 JFmLog.e(TAG, "txSetPowerLevel: exception during nativeJFmTx_SetPowerLevel (" 673 + e.toString() + ")"); 674 jFmTxStatus = JFmTxStatus.FAILED; 675 } 676 JFmLog.d(TAG, "txSetPowerLevel: exiting"); 677 return jFmTxStatus; 678 } 679 680 public JFmTxStatus txGetPowerLevel() { 681 JFmLog.d(TAG, "txGetPowerLevel: entered"); 682 683 JFmTxStatus jFmTxStatus; 684 685 try { 686 int status = nativeJFmTx_GetPowerLevel(txContext.getValue()); 687 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 688 JFmLog.d(TAG, "After nativeJFmnativeJFmTx_GetPowerLevel, status = " 689 + jFmTxStatus.toString()); 690 } catch (Exception e) { 691 JFmLog.e(TAG, "txGetPowerLevel: exception during nativeJFmnativeJFmTx_GetPowerLevel (" 692 + e.toString() + ")"); 693 jFmTxStatus = JFmTxStatus.FAILED; 694 } 695 JFmLog.d(TAG, "txGetPowerLevel: exiting"); 696 return jFmTxStatus; 697 } 698 699 public JFmTxStatus txEnableRds() { 700 JFmLog.d(TAG, "txEnableRds: entered"); 701 702 JFmTxStatus jFmTxStatus; 703 704 try { 705 int status = nativeJFmTx_EnableRds(txContext.getValue()); 706 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 707 JFmLog.d(TAG, "After nativeJFmTx_EnableRds, status = " + jFmTxStatus.toString()); 708 } catch (Exception e) { 709 JFmLog.e(TAG, "txEnableRds: exception during nativeJFmTx_EnableRds (" + e.toString() 710 + ")"); 711 jFmTxStatus = JFmTxStatus.FAILED; 712 } 713 JFmLog.d(TAG, "txEnableRds: exiting"); 714 return jFmTxStatus; 715 } 716 717 public JFmTxStatus txDisableRds() { 718 JFmLog.d(TAG, "txDisableRds: entered"); 719 720 JFmTxStatus jFmTxStatus; 721 722 try { 723 int status = nativeJFmTx_DisableRds(txContext.getValue()); 724 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 725 JFmLog.d(TAG, "After nativeJFmTx_DisableRds, status = " + jFmTxStatus.toString()); 726 } catch (Exception e) { 727 JFmLog.e(TAG, "txDisableRds: exception during nativeJFmTx_DisableRds (" + e.toString() 728 + ")"); 729 jFmTxStatus = JFmTxStatus.FAILED; 730 } 731 JFmLog.d(TAG, "txDisableRds: exiting"); 732 return jFmTxStatus; 733 } 734 735 public JFmTxStatus txSetRdsTransmissionMode(JFmTxRdsTransmissionMode mode) { 736 JFmLog.d(TAG, "txSetRdsTransmissionMode: entered"); 737 738 JFmTxStatus jFmTxStatus; 739 740 try { 741 int status = nativeJFmTx_SetRdsTransmissionMode(txContext.getValue(), mode.getValue()); 742 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 743 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTransmissionMode, status = " 744 + jFmTxStatus.toString()); 745 } catch (Exception e) { 746 JFmLog.e(TAG, 747 "txSetRdsTransmissionMode: exception during nativeJFmTx_SetRdsTransmissionMode (" 748 + e.toString() + ")"); 749 jFmTxStatus = JFmTxStatus.FAILED; 750 } 751 JFmLog.d(TAG, "txSetRdsTransmissionMode: exiting"); 752 return jFmTxStatus; 753 } 754 755 public JFmTxStatus txGetRdsTransmissionMode() { 756 JFmLog.d(TAG, "txGetRdsTransmissionMode: entered"); 757 758 JFmTxStatus jFmTxStatus; 759 760 try { 761 int status = nativeJFmTx_GetRdsTransmissionMode(txContext.getValue()); 762 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 763 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTransmissionMode, status = " 764 + jFmTxStatus.toString()); 765 } catch (Exception e) { 766 JFmLog.e(TAG, 767 "txGetRdsTransmissionMode: exception during nativeJFmTx_GetRdsTransmissionMode (" 768 + e.toString() + ")"); 769 jFmTxStatus = JFmTxStatus.FAILED; 770 } 771 JFmLog.d(TAG, "txGetRdsTransmissionMode: exiting"); 772 return jFmTxStatus; 773 } 774 775 public JFmTxStatus txSetRdsTextPsMsg(String psString, int length) { 776 JFmLog.d(TAG, "txSetRdsTextPsMsg: entered"); 777 JFmLog.d(TAG, "txSetRdsTextPsMsg psString => " + psString + " length = " + length); 778 JFmTxStatus jFmTxStatus; 779 780 try { 781 int status = nativeJFmTx_SetRdsTextPsMsg(txContext.getValue(), psString, length); 782 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 783 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTextPsMsg, status = " + jFmTxStatus.toString()); 784 } catch (Exception e) { 785 JFmLog.e(TAG, "txSetRdsTextPsMsg: exception during nativeJFmTx_SetRdsTextPsMsg (" 786 + e.toString() + ")"); 787 jFmTxStatus = JFmTxStatus.FAILED; 788 } 789 JFmLog.d(TAG, "txSetRdsTextPsMsg: exiting"); 790 return jFmTxStatus; 791 } 792 793 public JFmTxStatus txGetRdsTextPsMsg() { 794 JFmLog.d(TAG, "txGetRdsTextPsMsg: entered"); 795 JFmTxStatus jFmTxStatus; 796 797 try { 798 int status = nativeJFmTx_GetRdsTextPsMsg(txContext.getValue()); 799 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 800 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTextPsMsg, status = " + jFmTxStatus.toString()); 801 } catch (Exception e) { 802 JFmLog.e(TAG, "txSetRdsTextPsMsg: exception during nativeJFmTx_GetRdsTextPsMsg (" 803 + e.toString() + ")"); 804 jFmTxStatus = JFmTxStatus.FAILED; 805 } 806 JFmLog.d(TAG, "txGetRdsTextPsMsg: exiting"); 807 return jFmTxStatus; 808 } 809 810 public JFmTxStatus txWriteRdsRawData(String msg, int length) { 811 JFmLog.d(TAG, "txWriteRdsRawData: entered"); 812 813 JFmTxStatus jFmTxStatus; 814 815 try { 816 int status = nativeJFmTx_WriteRdsRawData(txContext.getValue(), msg, length); 817 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 818 JFmLog.d(TAG, "After nativeJFmTx_WriteRdsRawData, status = " + jFmTxStatus.toString()); 819 } catch (Exception e) { 820 JFmLog.e(TAG, "txWriteRdsRawData: exception during nativeJFmTx_WriteRdsRawData (" 821 + e.toString() + ")"); 822 jFmTxStatus = JFmTxStatus.FAILED; 823 } 824 JFmLog.d(TAG, "txWriteRdsRawData: exiting"); 825 return jFmTxStatus; 826 } 827 828 public JFmTxStatus txChangeDigitalSourceConfiguration(int ecalSampleFreq) { 829 JFmLog.d(TAG, "txChangeDigitalSourceConfiguration: entered"); 830 831 JFmTxStatus jFmTxStatus; 832 833 try { 834 int status = nativeJFmTx_ChangeDigitalSourceConfiguration(txContext.getValue(), 835 ecalSampleFreq); 836 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 837 JFmLog.d(TAG, "After nativeJFmTx_ChangeDigitalSourceConfiguration, status = " 838 + jFmTxStatus.toString()); 839 } catch (Exception e) { 840 JFmLog 841 .e( 842 TAG, 843 "txChangeDigitalSourceConfiguration: exception during nativeJFmTx_ChangeDigitalSourceConfiguration (" 844 + e.toString() + ")"); 845 jFmTxStatus = JFmTxStatus.FAILED; 846 } 847 JFmLog.d(TAG, "txChangeDigitalSourceConfiguration: exiting"); 848 return jFmTxStatus; 849 } 850 851 public JFmTxStatus txChangeAudioSource(JFmTxEcalResource audioSrc, 852 JFmTxEcalSampleFrequency ecalSampleFreq) { 853 JFmLog.d(TAG, "txChangeAudioSource: entered"); 854 855 JFmTxStatus jFmTxStatus; 856 857 try { 858 int status = nativeJFmTx_ChangeAudioSource(txContext.getValue(), audioSrc.getValue(), 859 ecalSampleFreq.getValue()); 860 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 861 JFmLog 862 .d(TAG, "After nativeJFmTx_ChangeAudioSource, status = " 863 + jFmTxStatus.toString()); 864 } catch (Exception e) { 865 JFmLog.e(TAG, "txChangeAudioSource: exception during nativeJFmTx_ChangeAudioSource (" 866 + e.toString() + ")"); 867 jFmTxStatus = JFmTxStatus.FAILED; 868 } 869 JFmLog.d(TAG, "txChangeAudioSource: exiting"); 870 return jFmTxStatus; 871 } 872 873 public JFmTxStatus txSetRdsECC(int ecc) { 874 JFmLog.d(TAG, "txSetRdsECC: entered"); 875 876 JFmTxStatus jFmTxStatus; 877 878 try { 879 int status = nativeJFmTx_SetRdsExtendedCountryCode(txContext.getValue(), ecc); 880 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 881 JFmLog.d(TAG, "After nativeJFmTx_SetRdsECC, status = " + jFmTxStatus.toString()); 882 } catch (Exception e) { 883 JFmLog.e(TAG, "txSetRdsECC: exception during nativeJFmTx_SetRdsECC (" + e.toString() 884 + ")"); 885 jFmTxStatus = JFmTxStatus.FAILED; 886 } 887 JFmLog.d(TAG, "txSetRdsECC: exiting"); 888 return jFmTxStatus; 889 } 890 891 public JFmTxStatus txGetRdsECC() { 892 JFmLog.d(TAG, "txGetRdsECC: entered"); 893 894 JFmTxStatus jFmTxStatus; 895 896 try { 897 int status = nativeJFmTx_GetRdsExtendedCountryCode(txContext.getValue()); 898 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 899 JFmLog.d(TAG, "After nativeJFmTx_GetRdsECC, status = " + jFmTxStatus.toString()); 900 } catch (Exception e) { 901 JFmLog.e(TAG, "txGetRdsECC: exception during nativeJFmTx_GetRdsECC (" + e.toString() 902 + ")"); 903 jFmTxStatus = JFmTxStatus.FAILED; 904 } 905 JFmLog.d(TAG, "txGetRdsECC: exiting"); 906 return jFmTxStatus; 907 } 908 909 public JFmTxStatus txSetMonoStereoMode(JFmTxMonoStereoMode mode) { 910 JFmLog.d(TAG, "txSetMonoStereoMode: entered"); 911 912 JFmTxStatus jFmTxStatus; 913 914 try { 915 int status = nativeJFmTx_SetMonoStereoMode(txContext.getValue(), mode.getValue()); 916 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 917 JFmLog 918 .d(TAG, "After nativeJFmTx_SetMonoStereoMode, status = " 919 + jFmTxStatus.toString()); 920 } catch (Exception e) { 921 JFmLog.e(TAG, "txSetMonoStereoMode: exception during nativeJFmTx_SetMonoStereoMode (" 922 + e.toString() + ")"); 923 jFmTxStatus = JFmTxStatus.FAILED; 924 } 925 JFmLog.d(TAG, "txSetMonoStereoMode: exiting"); 926 return jFmTxStatus; 927 } 928 929 public JFmTxStatus txGetMonoStereoMode() { 930 JFmLog.d(TAG, "txGetMonoStereoMode: entered"); 931 932 JFmTxStatus jFmTxStatus; 933 934 try { 935 int status = nativeJFmTx_GetMonoStereoMode(txContext.getValue()); 936 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 937 JFmLog 938 .d(TAG, "After nativeJFmTx_GetMonoStereoMode, status = " 939 + jFmTxStatus.toString()); 940 } catch (Exception e) { 941 JFmLog.e(TAG, "txSetRdsECC: exception during nativeJFmTx_GetMonoStereoMode (" 942 + e.toString() + ")"); 943 jFmTxStatus = JFmTxStatus.FAILED; 944 } 945 JFmLog.d(TAG, "txGetMonoStereoMode: exiting"); 946 return jFmTxStatus; 947 } 948 949 public JFmTxStatus txSetPreEmphasisFilter(JFmTxEmphasisFilter preEmpFilter) { 950 JFmLog.d(TAG, "txSetPreEmphasisFilter: entered"); 951 952 JFmTxStatus jFmTxStatus; 953 954 try { 955 int status = nativeJFmTx_SetPreEmphasisFilter(txContext.getValue(), preEmpFilter 956 .getValue()); 957 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 958 JFmLog.d(TAG, "After nativeJFmTx_SetPreEmphasisFilter, status = " 959 + jFmTxStatus.toString()); 960 } catch (Exception e) { 961 JFmLog.e(TAG, 962 "txSetPreEmphasisFilter: exception during nativeJFmTx_SetPreEmphasisFilter (" 963 + e.toString() + ")"); 964 jFmTxStatus = JFmTxStatus.FAILED; 965 } 966 JFmLog.d(TAG, "txSetPreEmphasisFilter: exiting"); 967 return jFmTxStatus; 968 } 969 970 public JFmTxStatus txGetPreEmphasisFilter() { 971 JFmLog.d(TAG, "txGetPreEmphasisFilter: entered"); 972 973 JFmTxStatus jFmTxStatus; 974 975 try { 976 int status = nativeJFmTx_GetPreEmphasisFilter(txContext.getValue()); 977 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 978 JFmLog.d(TAG, "After nativeJFmTx_GetPreEmphasisFilter, status = " 979 + jFmTxStatus.toString()); 980 } catch (Exception e) { 981 JFmLog.e(TAG, 982 "txSetPreEmphasisFilter: exception during nativeJFmTx_GetPreEmphasisFilter (" 983 + e.toString() + ")"); 984 jFmTxStatus = JFmTxStatus.FAILED; 985 } 986 JFmLog.d(TAG, "txGetPreEmphasisFilter: exiting"); 987 return jFmTxStatus; 988 } 989 990 public JFmTxStatus txSetMuteMode(JFmTxMuteMode muteMode) { 991 JFmLog.d(TAG, "txSetMuteMode: entered"); 992 993 JFmTxStatus jFmTxStatus; 994 995 try { 996 int status = nativeJFmTx_SetMuteMode(txContext.getValue(), muteMode.getValue()); 997 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 998 JFmLog.d(TAG, "After nativeJFmTx_SetMuteMode, status = " + jFmTxStatus.toString()); 999 } catch (Exception e) { 1000 JFmLog.e(TAG, "txSetMuteMode: exception during nativeJFmTx_SetMuteMode (" 1001 + e.toString() + ")"); 1002 jFmTxStatus = JFmTxStatus.FAILED; 1003 } 1004 JFmLog.d(TAG, "txSetMuteMode: exiting"); 1005 return jFmTxStatus; 1006 } 1007 1008 public JFmTxStatus txGetMuteMode() { 1009 JFmLog.d(TAG, "txGetMuteMode: entered"); 1010 1011 JFmTxStatus jFmTxStatus; 1012 1013 try { 1014 int status = nativeJFmTx_GetMuteMode(txContext.getValue()); 1015 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1016 JFmLog.d(TAG, "After nativeJFmTx_GetMuteMode, status = " + jFmTxStatus.toString()); 1017 } catch (Exception e) { 1018 JFmLog.e(TAG, "txGetMuteMode: exception during nativeJFmTx_GetMuteMode (" 1019 + e.toString() + ")"); 1020 jFmTxStatus = JFmTxStatus.FAILED; 1021 } 1022 JFmLog.d(TAG, "txGetMuteMode: exiting"); 1023 return jFmTxStatus; 1024 } 1025 1026 public JFmTxStatus txSetRdsAfCode(int afCode) { 1027 JFmLog.d(TAG, "txSetRdsAfCode: entered"); 1028 1029 JFmTxStatus jFmTxStatus; 1030 1031 try { 1032 int status = nativeJFmTx_SetRdsAfCode(txContext.getValue(), afCode); 1033 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1034 JFmLog.d(TAG, "After nativeJFmTx_SetRdsAfCode, status = " + jFmTxStatus.toString()); 1035 } catch (Exception e) { 1036 JFmLog.e(TAG, "txSetRdsAfCode: exception during nativeJFmTx_SetRdsAfCode (" 1037 + e.toString() + ")"); 1038 jFmTxStatus = JFmTxStatus.FAILED; 1039 } 1040 JFmLog.d(TAG, "txSetRdsAfCode: exiting"); 1041 return jFmTxStatus; 1042 } 1043 1044 public JFmTxStatus txGetRdsAfCode() { 1045 JFmLog.d(TAG, "txGetRdsAfCode: entered"); 1046 1047 JFmTxStatus jFmTxStatus; 1048 1049 try { 1050 int status = nativeJFmTx_GetRdsAfCode(txContext.getValue()); 1051 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1052 JFmLog.d(TAG, "After nativeJFmTx_GetRdsAfCode, status = " + jFmTxStatus.toString()); 1053 } catch (Exception e) { 1054 JFmLog.e(TAG, "txGetRdsAfCode: exception during nativeJFmTx_GetRdsAfCode (" 1055 + e.toString() + ")"); 1056 jFmTxStatus = JFmTxStatus.FAILED; 1057 } 1058 JFmLog.d(TAG, "txGetRdsAfCode: exiting"); 1059 return jFmTxStatus; 1060 } 1061 1062 public JFmTxStatus txSetRdsPiCode(JFmTxRdsPiCode piCode) { 1063 JFmLog.d(TAG, "txSetRdsPiCode: entered"); 1064 1065 JFmTxStatus jFmTxStatus; 1066 1067 try { 1068 int status = nativeJFmTx_SetRdsPiCode(txContext.getValue(), piCode.getValue()); 1069 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1070 JFmLog.d(TAG, "After nativeJFmTx_SetRdsPiCode, status = " + jFmTxStatus.toString()); 1071 } catch (Exception e) { 1072 JFmLog.e(TAG, "txSetRdsPiCode: exception during nativeJFmTx_SetRdsPiCode (" 1073 + e.toString() + ")"); 1074 jFmTxStatus = JFmTxStatus.FAILED; 1075 } 1076 JFmLog.d(TAG, "txSetRdsPiCode: exiting"); 1077 return jFmTxStatus; 1078 } 1079 1080 public JFmTxStatus txGetRdsPiCode() { 1081 JFmLog.d(TAG, "txGetRdsPiCode: entered"); 1082 1083 JFmTxStatus jFmTxStatus; 1084 1085 try { 1086 int status = nativeJFmTx_GetRdsPiCode(txContext.getValue()); 1087 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1088 JFmLog.d(TAG, "After nativeJFmTx_SetRdsPiCode, status = " + jFmTxStatus.toString()); 1089 } catch (Exception e) { 1090 JFmLog.e(TAG, "txGetRdsPiCode: exception during nativeJFmTx_SetRdsPiCode (" 1091 + e.toString() + ")"); 1092 jFmTxStatus = JFmTxStatus.FAILED; 1093 } 1094 JFmLog.d(TAG, "txGetRdsPiCode: exiting"); 1095 return jFmTxStatus; 1096 } 1097 1098 public JFmTxStatus txSetRdsPtyCode(JFmTxRdsPtyCode ptyCode) { 1099 JFmLog.d(TAG, "txSetRdsPtyCode: entered"); 1100 1101 JFmTxStatus jFmTxStatus; 1102 1103 try { 1104 int status = nativeJFmTx_SetRdsPtyCode(txContext.getValue(), ptyCode.getValue()); 1105 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1106 JFmLog.d(TAG, "After nativeJFmTx_SetRdsPtyCode, status = " + jFmTxStatus.toString()); 1107 } catch (Exception e) { 1108 JFmLog.e(TAG, "txSetRdsPtyCode: exception during nativeJFmTx_SetRdsPtyCode(" 1109 + e.toString() + ")"); 1110 jFmTxStatus = JFmTxStatus.FAILED; 1111 } 1112 JFmLog.d(TAG, "txSetRdsPtyCode: exiting"); 1113 return jFmTxStatus; 1114 } 1115 1116 public JFmTxStatus txGetRdsPtyCode() { 1117 JFmLog.d(TAG, "txGetRdsPtyCode: entered"); 1118 1119 JFmTxStatus jFmTxStatus; 1120 1121 try { 1122 int status = nativeJFmTx_GetRdsPtyCode(txContext.getValue()); 1123 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1124 JFmLog.d(TAG, "After nativeJFmTx_GetRdsPtyCode, status = " + jFmTxStatus.toString()); 1125 } catch (Exception e) { 1126 JFmLog.e(TAG, "txGetRdsPtyCode: exception during nativeJFmTx_GetRdsPtyCode(" 1127 + e.toString() + ")"); 1128 jFmTxStatus = JFmTxStatus.FAILED; 1129 } 1130 JFmLog.d(TAG, "txGetRdsPtyCode: exiting"); 1131 return jFmTxStatus; 1132 } 1133 1134 public JFmTxStatus txSetRdsTextRepertoire(JFmTxRepertoire repertoire) { 1135 JFmLog.d(TAG, "txSetRdsTextRepertoire: entered"); 1136 1137 JFmTxStatus jFmTxStatus; 1138 1139 try { 1140 int status = nativeJFmTx_SetRdsTextRepertoire(txContext.getValue(), repertoire 1141 .getValue()); 1142 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1143 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTextRepertoire, status = " 1144 + jFmTxStatus.toString()); 1145 } catch (Exception e) { 1146 JFmLog.e(TAG, 1147 "txSetRdsTextRepertoire: exception during nativeJFmTx_SetRdsTextRepertoire (" 1148 + e.toString() + ")"); 1149 jFmTxStatus = JFmTxStatus.FAILED; 1150 } 1151 JFmLog.d(TAG, "txSetRdsTextRepertoire: exiting"); 1152 return jFmTxStatus; 1153 } 1154 1155 public JFmTxStatus txGetRdsTextRepertoire() { 1156 JFmLog.d(TAG, "txGetRdsTextRepertoire: entered"); 1157 1158 JFmTxStatus jFmTxStatus; 1159 1160 try { 1161 int status = nativeJFmTx_GetRdsTextRepertoire(txContext.getValue()); 1162 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1163 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTextRepertoire, status = " 1164 + jFmTxStatus.toString()); 1165 } catch (Exception e) { 1166 JFmLog.e(TAG, 1167 "txGetRdsTextRepertoire: exception during nativeJFmTx_GetRdsTextRepertoire (" 1168 + e.toString() + ")"); 1169 jFmTxStatus = JFmTxStatus.FAILED; 1170 } 1171 JFmLog.d(TAG, "txGetRdsTextRepertoire: exiting"); 1172 return jFmTxStatus; 1173 } 1174 1175 public JFmTxStatus txSetRdsPsDisplayMode(JFmRdsPsDisplayMode dispalyMode) { 1176 JFmLog.d(TAG, "txSetRdsPsDisplayMode: entered"); 1177 1178 JFmTxStatus jFmTxStatus; 1179 1180 try { 1181 int status = nativeJFmTx_SetRdsPsDisplayMode(txContext.getValue(), dispalyMode 1182 .getValue()); 1183 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1184 JFmLog.d(TAG, "After nativeJFmTx_SetRdsECC, status = " + jFmTxStatus.toString()); 1185 } catch (Exception e) { 1186 JFmLog.e(TAG, "txSetRdsECC: exception during nativeJFmTx_SetRdsECC (" + e.toString() 1187 + ")"); 1188 jFmTxStatus = JFmTxStatus.FAILED; 1189 } 1190 JFmLog.d(TAG, "txSetRdsECC: exiting"); 1191 return jFmTxStatus; 1192 } 1193 1194 public JFmTxStatus txGetRdsPsDisplayMode() { 1195 JFmLog.d(TAG, "txGetRdsPsDisplayMode: entered"); 1196 1197 JFmTxStatus jFmTxStatus; 1198 1199 try { 1200 int status = nativeJFmTx_GetRdsPsDisplayMode(txContext.getValue()); 1201 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1202 JFmLog.d(TAG, "After nativeJFmTx_GetRdsPsDisplayMode, status = " 1203 + jFmTxStatus.toString()); 1204 } catch (Exception e) { 1205 JFmLog.e(TAG, "txGetRdsECC: exception during nativeJFmTx_GetRdsPsDisplayMode (" 1206 + e.toString() + ")"); 1207 jFmTxStatus = JFmTxStatus.FAILED; 1208 } 1209 JFmLog.d(TAG, "txGetRdsECC: exiting"); 1210 return jFmTxStatus; 1211 } 1212 1213 public JFmTxStatus txSetRdsPsScrollSpeed(int scrollSpeed) { 1214 JFmLog.d(TAG, "txSetRdsPsScrollSpeed: entered"); 1215 1216 JFmTxStatus jFmTxStatus; 1217 1218 try { 1219 int status = nativeJFmTx_SetRdsPsScrollSpeed(txContext.getValue(), scrollSpeed); 1220 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1221 JFmLog.d(TAG, "After nativeJFmTx_SetRdsPsScrollSpeed, status = " 1222 + jFmTxStatus.toString()); 1223 } catch (Exception e) { 1224 JFmLog.e(TAG, 1225 "txSetRdsPsScrollSpeed: exception during nativeJFmTx_SetRdsPsScrollSpeed (" 1226 + e.toString() + ")"); 1227 jFmTxStatus = JFmTxStatus.FAILED; 1228 } 1229 JFmLog.d(TAG, "txSetRdsPsScrollSpeed: exiting"); 1230 return jFmTxStatus; 1231 } 1232 1233 public JFmTxStatus txGetRdsPsScrollSpeed() { 1234 JFmLog.d(TAG, "txGetRdsPsScrollSpeed: entered"); 1235 1236 JFmTxStatus jFmTxStatus; 1237 1238 try { 1239 int status = nativeJFmTx_GetRdsPsScrollSpeed(txContext.getValue()); 1240 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1241 JFmLog.d(TAG, "After nativeJFmTx_GetRdsPsScrollSpeed, status = " 1242 + jFmTxStatus.toString()); 1243 } catch (Exception e) { 1244 JFmLog.e(TAG, 1245 "txGetRdsPsScrollSpeed: exception during nativeJFmTx_GetRdsPsScrollSpeed (" 1246 + e.toString() + ")"); 1247 jFmTxStatus = JFmTxStatus.FAILED; 1248 } 1249 JFmLog.d(TAG, "txGetRdsPsScrollSpeed: exiting"); 1250 return jFmTxStatus; 1251 } 1252 1253 public JFmTxStatus txSetRdsTextRtMsg(JFmRdsRtMsgType msgType, String msg, int msgLength) { 1254 JFmLog.d(TAG, "txSetRdsTextRtMsg: entered"); 1255 JFmLog.d(TAG, "txSetRdsTextRtMsg msg = " + msg + " msgLength = " + msgLength); 1256 JFmTxStatus jFmTxStatus; 1257 // byte[] message = msg.getBytes(); 1258 try { 1259 int status = nativeJFmTx_SetRdsTextRtMsg(txContext.getValue(), msgType.getValue(), msg, 1260 msgLength); 1261 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1262 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTextRtMsg, status = " + jFmTxStatus.toString()); 1263 } catch (Exception e) { 1264 JFmLog.e(TAG, "txSetRdsTextRtMsg: exception during nativeJFmTx_SetRdsECC (" 1265 + e.toString() + ")"); 1266 jFmTxStatus = JFmTxStatus.FAILED; 1267 } 1268 JFmLog.d(TAG, "txSetRdsTextRtMsg: exiting"); 1269 return jFmTxStatus; 1270 } 1271 1272 public JFmTxStatus txGetRdsTextRtMsg() { 1273 JFmLog.d(TAG, "txGetRdsTextRtMsg: entered"); 1274 1275 JFmTxStatus jFmTxStatus; 1276 // byte[] message = msg.getBytes(); 1277 try { 1278 int status = nativeJFmTx_GetRdsTextRtMsg(txContext.getValue()); 1279 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1280 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTextRtMsg, status = " + jFmTxStatus.toString()); 1281 } catch (Exception e) { 1282 JFmLog.e(TAG, "txGetRdsTextRtMsg: exception during nativeJFmTx_GetRdsECC (" 1283 + e.toString() + ")"); 1284 jFmTxStatus = JFmTxStatus.FAILED; 1285 } 1286 JFmLog.d(TAG, "txGetRdsTextRtMsg: exiting"); 1287 return jFmTxStatus; 1288 } 1289 1290 public JFmTxStatus txSetRdsTransmittedGroupsMask(long rdsTrasmittedGrpMask) { 1291 JFmLog.d(TAG, "txSetRdsTransmittedGroupsMask: entered"); 1292 1293 JFmTxStatus jFmTxStatus; 1294 1295 try { 1296 int status = nativeJFmTx_SetRdsTransmittedGroupsMask(txContext.getValue(), 1297 rdsTrasmittedGrpMask); 1298 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1299 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTransmittedGroupsMask, status = " 1300 + jFmTxStatus.toString()); 1301 } catch (Exception e) { 1302 JFmLog.e(TAG, 1303 "txSetRdsTransmittedGroupsMask: exception during nativeJFmTx_SetRdsTransmittedGroupsMask (" 1304 + e.toString() + ")"); 1305 jFmTxStatus = JFmTxStatus.FAILED; 1306 } 1307 JFmLog.d(TAG, "txSetRdsTransmittedGroupsMask: exiting"); 1308 return jFmTxStatus; 1309 } 1310 1311 public JFmTxStatus txGetRdsTransmittedGroupsMask() { 1312 JFmLog.d(TAG, "txGetRdsTransmittedGroupsMask: entered"); 1313 1314 JFmTxStatus jFmTxStatus; 1315 1316 try { 1317 int status = nativeJFmTx_GetRdsTransmittedGroupsMask(txContext.getValue()); 1318 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1319 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTransmittedGroupsMask, status = " 1320 + jFmTxStatus.toString()); 1321 } catch (Exception e) { 1322 JFmLog.e(TAG, 1323 "txGetRdsTransmittedGroupsMask: exception during nativeJFmTx_getRdsTransmittedGroupsMask (" 1324 + e.toString() + ")"); 1325 jFmTxStatus = JFmTxStatus.FAILED; 1326 } 1327 JFmLog.d(TAG, "txGetRdsTransmittedGroupsMask: exiting"); 1328 return jFmTxStatus; 1329 } 1330 1331 public JFmTxStatus txSetRdsTrafficCodes(JFmTaCode taCode, JFmTpCode tpCode) { 1332 JFmLog.d(TAG, "txSetRdsTransmittedGroupsMask: entered"); 1333 1334 JFmTxStatus jFmTxStatus; 1335 1336 try { 1337 int status = nativeJFmTx_SetRdsTrafficCodes(txContext.getValue(), taCode.getValue(), 1338 tpCode.getValue()); 1339 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1340 JFmLog.d(TAG, "After nativeJFmTx_SetRdsTrafficCodes, status = " 1341 + jFmTxStatus.toString()); 1342 } catch (Exception e) { 1343 JFmLog.e(TAG, 1344 "txSetRdsTransmittedGroupsMask: exception during nativeJFmTx_SetRdsTrafficCodes (" 1345 + e.toString() + ")"); 1346 jFmTxStatus = JFmTxStatus.FAILED; 1347 } 1348 JFmLog.d(TAG, "txSetRdsTransmittedGroupsMask: exiting"); 1349 return jFmTxStatus; 1350 } 1351 1352 public JFmTxStatus txGetRdsTrafficCodes() { 1353 JFmLog.d(TAG, "txGetRdsTrafficCodes: entered"); 1354 1355 JFmTxStatus jFmTxStatus; 1356 1357 try { 1358 int status = nativeJFmTx_GetRdsTrafficCodes(txContext.getValue()); 1359 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1360 JFmLog.d(TAG, "After nativeJFmTx_GetRdsTrafficCodes, status = " 1361 + jFmTxStatus.toString()); 1362 } catch (Exception e) { 1363 JFmLog.e(TAG, "txGetRdsTrafficCodes: exception during nativeJFmTx_GetRdsTrafficCodes (" 1364 + e.toString() + ")"); 1365 jFmTxStatus = JFmTxStatus.FAILED; 1366 } 1367 JFmLog.d(TAG, "txGetRdsTrafficCodes: exiting"); 1368 return jFmTxStatus; 1369 } 1370 1371 public JFmTxStatus txSetRdsMusicSpeechFlag(JFmMusicSpeechFlag musicSpeechFlag) { 1372 JFmLog.d(TAG, "txSetRdsMusicSpeechFlag: entered"); 1373 1374 JFmTxStatus jFmTxStatus; 1375 1376 try { 1377 int status = nativeJFmTx_SetRdsMusicSpeechFlag(txContext.getValue(), musicSpeechFlag 1378 .getValue()); 1379 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1380 JFmLog.d(TAG, "After nativeJFmTx_SetRdsECC, status = " + jFmTxStatus.toString()); 1381 } catch (Exception e) { 1382 JFmLog.e(TAG, "txSetRdsMusicSpeechFlag: exception during nativeJFmTx_SetRdsECC (" 1383 + e.toString() + ")"); 1384 jFmTxStatus = JFmTxStatus.FAILED; 1385 } 1386 JFmLog.d(TAG, "txSetRdsMusicSpeechFlag: exiting"); 1387 return jFmTxStatus; 1388 } 1389 1390 public JFmTxStatus txGetRdsMusicSpeechFlag() { 1391 JFmLog.d(TAG, "txGetRdsMusicSpeechFlag: entered"); 1392 1393 JFmTxStatus jFmTxStatus; 1394 1395 try { 1396 int status = nativeJFmTx_GetRdsMusicSpeechFlag(txContext.getValue()); 1397 jFmTxStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1398 JFmLog.d(TAG, "After nativeJFmTx_GetRdsMusicSpeechFlag, status = " 1399 + jFmTxStatus.toString()); 1400 } catch (Exception e) { 1401 JFmLog.e(TAG, 1402 "txGetRdsMusicSpeechFlag: exception during nativeJFmTx_GetRdsMusicSpeechFlag (" 1403 + e.toString() + ")"); 1404 jFmTxStatus = JFmTxStatus.FAILED; 1405 } 1406 JFmLog.d(TAG, "txGetRdsMusicSpeechFlag: exiting"); 1407 return jFmTxStatus; 1408 } 1409 1410 /*-------------------------------------------------------------------------- 1411 * NATIVE PART 1412 *------------------------------------------------------------------------*/ 1413 1414 /* RBTL Calls */ 1415 1416 /* FM TX */ 1417 private static native void nativeJFmTx_ClassInitNative(); 1418 1419 private static native int nativeJFmTx_Create(JFmContext contextValue); 1420 1421 private static native int nativeJFmTx_Enable(long contextValue); 1422 1423 private static native int nativeJFmTx_Tune(long contextValue, long jFmTxFreq); 1424 1425 private static native int nativeJFmTx_GetTunedFrequency(long contextValue); 1426 1427 private static native int nativeJFmTx_StartTransmission(long contextValue); 1428 1429 private static native int nativeJFmTx_Disable(long contextValue); 1430 1431 private static native int nativeJFmTx_Destroy(long contextValue); 1432 1433 private static native int nativeJFmTx_StopTransmission(long contextValue); 1434 1435 private static native int nativeJFmTx_SetPowerLevel(long contextValue, int powerLevel); 1436 1437 private static native int nativeJFmTx_GetPowerLevel(long contextValue); 1438 1439 private static native int nativeJFmTx_EnableRds(long contextValue); 1440 1441 private static native int nativeJFmTx_DisableRds(long contextValue); 1442 1443 private static native int nativeJFmTx_SetRdsTransmissionMode(long contextValue, int mode); 1444 1445 private static native int nativeJFmTx_GetRdsTransmissionMode(long contextValue); 1446 1447 private static native int nativeJFmTx_SetRdsTextPsMsg(long contextValue, 1448 java.lang.String psString, int length); 1449 1450 private static native int nativeJFmTx_GetRdsTextPsMsg(long contextValue); 1451 1452 private static native int nativeJFmTx_WriteRdsRawData(long contextValue, java.lang.String msg, 1453 int length); 1454 1455 private static native int nativeJFmTx_ChangeDigitalSourceConfiguration(long contextValue, 1456 int ecalSampleFreq); 1457 1458 private static native int nativeJFmTx_ChangeAudioSource(long contextValue, int audioSrc, 1459 int ecalSampleFreq); 1460 1461 private static native int nativeJFmTx_SetRdsExtendedCountryCode(long contextValue, int ecc); 1462 1463 private static native int nativeJFmTx_GetRdsExtendedCountryCode(long contextValue); 1464 1465 private static native int nativeJFmTx_SetRdsMusicSpeechFlag(long contextValue, 1466 int musicSpeechFlag); 1467 1468 private static native int nativeJFmTx_GetRdsMusicSpeechFlag(long contextValue); 1469 1470 private static native int nativeJFmTx_SetRdsTrafficCodes(long contextValue, int taCode, 1471 int tpCode); 1472 1473 private static native int nativeJFmTx_GetRdsTrafficCodes(long contextValue); 1474 1475 private static native int nativeJFmTx_SetRdsTransmittedGroupsMask(long contextValue, long taCode); 1476 1477 private static native int nativeJFmTx_GetRdsTransmittedGroupsMask(long contextValue); 1478 1479 private static native int nativeJFmTx_SetRdsTextRtMsg(long contextValue, int msgType, 1480 java.lang.String msg, int msgLength); 1481 1482 private static native int nativeJFmTx_GetRdsTextRtMsg(long contextValue); 1483 1484 private static native int nativeJFmTx_SetRdsPsScrollSpeed(long contextValue, int scrollSpeed); 1485 1486 private static native int nativeJFmTx_GetRdsPsScrollSpeed(long contextValue); 1487 1488 private static native int nativeJFmTx_SetMuteMode(long contextValue, int muteMode); 1489 1490 private static native int nativeJFmTx_GetMuteMode(long contextValue); 1491 1492 private static native int nativeJFmTx_SetRdsAfCode(long contextValue, int afCode); 1493 1494 private static native int nativeJFmTx_GetRdsAfCode(long contextValue); 1495 1496 private static native int nativeJFmTx_SetRdsPiCode(long contextValue, int piCode); 1497 1498 private static native int nativeJFmTx_GetRdsPiCode(long contextValue); 1499 1500 private static native int nativeJFmTx_SetRdsPtyCode(long contextValue, int ptyCode); 1501 1502 private static native int nativeJFmTx_GetRdsPtyCode(long contextValue); 1503 1504 private static native int nativeJFmTx_SetRdsPsDisplayMode(long contextValue, int displayMode); 1505 1506 private static native int nativeJFmTx_GetRdsPsDisplayMode(long contextValue); 1507 1508 private static native int nativeJFmTx_SetRdsTextRepertoire(long contextValue, int reprtoire); 1509 1510 private static native int nativeJFmTx_GetRdsTextRepertoire(long contextValue); 1511 1512 private static native int nativeJFmTx_SetPreEmphasisFilter(long contextValue, int preEmpFilter); 1513 1514 private static native int nativeJFmTx_GetPreEmphasisFilter(long contextValue); 1515 1516 private static native int nativeJFmTx_GetMonoStereoMode(long contextValue); 1517 1518 private static native int nativeJFmTx_SetMonoStereoMode(long contextValue, int mode); 1519 1520 private static native int nativeJFmTx_ReadRdsRawData(long contextValue); 1521 1522 /*--------------------------------------------------------------------------- 1523 * -------------------------------- NATIVE PART-------------------------------- 1524 * --------------------------------------------------------------------------- 1525 */ 1526 1527 /*--------------------------------------------------------------------------- 1528 * ---------------------------------------------- Callbacks from the------------- 1529 * JFmTxNative.cpp module ----------------------------------------------------- 1530 */ 1531 1532 /********* FM TX ***********/ 1533 1534 @SuppressWarnings("unused") 1535 public static void nativeCb_fmTxCmdEnable(long contextValue, int status, long value) { 1536 1537 JFmLog.d(TAG, "nativeCb_fmTxCmdEnable: entered"); 1538 1539 JFmTx mJFmTx = getJFmTx(contextValue); 1540 1541 if (mJFmTx != null) { 1542 1543 ICallback callback = mJFmTx.callback; 1544 1545 JFmLog.d(TAG, "nativeCb_fmTxCmdEnable: converting callback args"); 1546 1547 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1548 1549 JFmLog.d(TAG, "nativeCb_fmTxCmdEnable: calling callback"); 1550 1551 callback.fmTxCmdEnable(mJFmTx, txStatus, value); 1552 1553 } 1554 1555 } 1556 1557 @SuppressWarnings("unused") 1558 public static void nativeCb_fmTxCmdDisable(long contextValue, int status, long value) { 1559 1560 JFmLog.d(TAG, "nativeCb_fmTxCmdDisable: entered"); 1561 1562 JFmTx mJFmTx = getJFmTx(contextValue); 1563 1564 if (mJFmTx != null) { 1565 1566 ICallback callback = mJFmTx.callback; 1567 1568 JFmLog.d(TAG, "nativeCb_fmTxCmdDisable: converting callback args"); 1569 1570 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1571 1572 JFmLog.d(TAG, "nativeCb_fmTxCmdDisable: calling callback"); 1573 1574 callback.fmTxCmdDisable(mJFmTx, txStatus, value); 1575 1576 } 1577 1578 } 1579 1580 @SuppressWarnings("unused") 1581 public static void nativeCb_fmTxCmdDestroy(long contextValue, int status, long value) { 1582 1583 JFmLog.d(TAG, "nativeCb_fmTxCmdDestroy: entered"); 1584 1585 JFmTx mJFmTx = getJFmTx(contextValue); 1586 1587 if (mJFmTx != null) { 1588 1589 ICallback callback = mJFmTx.callback; 1590 1591 JFmLog.d(TAG, "nativeCb_fmTxCmdDestroy: converting callback args"); 1592 1593 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1594 1595 JFmLog.d(TAG, "nativeCb_fmTxCmdDestroy: calling callback"); 1596 1597 callback.fmTxCmdDestroy(mJFmTx, txStatus, value); 1598 1599 } 1600 1601 } 1602 1603 @SuppressWarnings("unused") 1604 public static void nativeCb_fmTxCmdTune(long contextValue, int status, long value) { 1605 1606 JFmLog.d(TAG, "nativeCb_fmTxCmdTune: entered"); 1607 1608 JFmTx mJFmTx = getJFmTx(contextValue); 1609 1610 if (mJFmTx != null) { 1611 1612 ICallback callback = mJFmTx.callback; 1613 1614 JFmLog.d(TAG, "nativeCb_fmTxCmdTune: converting callback args"); 1615 1616 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1617 1618 JFmLog.d(TAG, "nativeCb_fmTxCmdTune: calling callback"); 1619 1620 callback.fmTxCmdTune(mJFmTx, txStatus, value); 1621 1622 } 1623 1624 } 1625 1626 @SuppressWarnings("unused") 1627 public static void nativeCb_fmTxCmdGetTunedFrequency(long contextValue, int status, long value) { 1628 1629 JFmLog.d(TAG, "nativeCb_fmTxCmdGetTunedFrequency: entered"); 1630 1631 JFmTx mJFmTx = getJFmTx(contextValue); 1632 1633 if (mJFmTx != null) { 1634 1635 ICallback callback = mJFmTx.callback; 1636 1637 JFmLog.d(TAG, "nativeCb_fmTxCmdGetTunedFrequency: converting callback args"); 1638 1639 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1640 1641 JFmLog.d(TAG, "nativeCb_fmTxCmdGetTunedFrequency: calling callback"); 1642 1643 callback.fmTxCmdGetTunedFrequency(mJFmTx, txStatus, value); 1644 1645 } 1646 1647 } 1648 1649 @SuppressWarnings("unused") 1650 public static void nativeCb_fmTxCmdStopTransmission(long contextValue, int status, long value) { 1651 1652 JFmLog.d(TAG, "nativeCb_fmTxCmdStopTransmission: entered"); 1653 1654 JFmTx mJFmTx = getJFmTx(contextValue); 1655 1656 if (mJFmTx != null) { 1657 1658 ICallback callback = mJFmTx.callback; 1659 1660 JFmLog.d(TAG, "nativeCb_fmTxCmdStopTransmission: converting callback args"); 1661 1662 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1663 1664 JFmLog.d(TAG, "nativeCb_fmTxCmdStopTransmission: calling callback"); 1665 1666 callback.fmTxCmdStopTransmission(mJFmTx, txStatus, value); 1667 1668 } 1669 1670 } 1671 1672 @SuppressWarnings("unused") 1673 public static void nativeCb_fmTxCmdStartTransmission(long contextValue, int status/* 1674 * , 1675 * JFmCcmVacUnavailResourceList 1676 * ccmVacUnavailResourceList 1677 */) { 1678 1679 JFmLog.d(TAG, "nativeCb_fmTxCmdStartTransmission: entered"); 1680 1681 JFmTx mJFmTx = getJFmTx(contextValue); 1682 1683 if (mJFmTx != null) { 1684 1685 ICallback callback = mJFmTx.callback; 1686 1687 JFmLog.d(TAG, "nativeCb_fmTxCmdStartTransmission: converting callback args"); 1688 1689 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1690 1691 JFmLog.d(TAG, "nativeCb_fmTxCmdStartTransmission: calling callback"); 1692 1693 callback.fmTxCmdStartTransmission(mJFmTx, txStatus/* 1694 * , 1695 * ccmVacUnavailResourceList 1696 */); 1697 1698 } 1699 1700 } 1701 1702 @SuppressWarnings("unused") 1703 public static void nativeCb_fmTxCmdEnableRds(long contextValue, int status, long value) { 1704 1705 JFmLog.d(TAG, "nativeCb_fmTxCmdEnableRds: entered"); 1706 1707 JFmTx mJFmTx = getJFmTx(contextValue); 1708 1709 if (mJFmTx != null) { 1710 1711 ICallback callback = mJFmTx.callback; 1712 1713 JFmLog.d(TAG, "nativeCb_fmTxCmdEnableRds: converting callback args"); 1714 1715 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1716 1717 JFmLog.d(TAG, "nativeCb_fmTxCmdEnableRds: calling callback"); 1718 1719 callback.fmTxCmdEnableRds(mJFmTx, txStatus, value); 1720 1721 } 1722 1723 } 1724 1725 @SuppressWarnings("unused") 1726 public static void nativeCb_fmTxCmdDisableRds(long contextValue, int status, long value) { 1727 1728 JFmLog.d(TAG, "nativeCb_fmTxCmdDisableRds: entered"); 1729 1730 JFmTx mJFmTx = getJFmTx(contextValue); 1731 1732 if (mJFmTx != null) { 1733 1734 ICallback callback = mJFmTx.callback; 1735 1736 JFmLog.d(TAG, "nativeCb_fmTxCmdDisableRds: converting callback args"); 1737 1738 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1739 1740 JFmLog.d(TAG, "nativeCb_fmTxCmdDisableRds: calling callback"); 1741 1742 callback.fmTxCmdDisableRds(mJFmTx, txStatus, value); 1743 1744 } 1745 1746 } 1747 1748 @SuppressWarnings("unused") 1749 public static void nativeCb_fmTxCmdSetRdsTransmissionMode(long contextValue, int status, 1750 long value) { 1751 1752 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmissionMode: entered"); 1753 1754 JFmTx mJFmTx = getJFmTx(contextValue); 1755 1756 if (mJFmTx != null) { 1757 1758 ICallback callback = mJFmTx.callback; 1759 1760 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmissionMode: converting callback args"); 1761 1762 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1763 1764 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmissionMode: calling callback"); 1765 1766 callback.fmTxCmdSetRdsTransmissionMode(mJFmTx, txStatus, value); 1767 1768 } 1769 1770 } 1771 1772 @SuppressWarnings("unused") 1773 public static void nativeCb_fmTxCmdGetRdsTransmissionMode(long contextValue, int status, 1774 long value) { 1775 1776 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmissionMode: entered"); 1777 1778 JFmTx mJFmTx = getJFmTx(contextValue); 1779 1780 if (mJFmTx != null) { 1781 1782 ICallback callback = mJFmTx.callback; 1783 1784 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmissionMode: converting callback args"); 1785 1786 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1787 1788 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmissionMode: calling callback"); 1789 1790 callback.fmTxCmdGetRdsTransmissionMode(mJFmTx, txStatus, value); 1791 1792 } 1793 1794 } 1795 1796 @SuppressWarnings("unused") 1797 public static void nativeCb_fmTxCmdSetMonoStereoMode(long contextValue, int status, long value) { 1798 1799 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMonoStereoMode: entered"); 1800 1801 JFmTx mJFmTx = getJFmTx(contextValue); 1802 1803 if (mJFmTx != null) { 1804 1805 ICallback callback = mJFmTx.callback; 1806 1807 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMonoStereoMode: converting callback args"); 1808 1809 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1810 1811 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMonoStereoMode: calling callback"); 1812 1813 callback.fmTxCmdSetMonoStereoMode(mJFmTx, txStatus, value); 1814 1815 } 1816 1817 } 1818 1819 @SuppressWarnings("unused") 1820 public static void nativeCb_fmTxCmdGetMonoStereoMode(long contextValue, int status, long value) { 1821 1822 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMonoStereoMode: entered"); 1823 1824 JFmTx mJFmTx = getJFmTx(contextValue); 1825 1826 if (mJFmTx != null) { 1827 1828 ICallback callback = mJFmTx.callback; 1829 1830 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMonoStereoMode: converting callback args"); 1831 1832 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1833 1834 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMonoStereoMode: calling callback"); 1835 1836 callback.fmTxCmdGetMonoStereoMode(mJFmTx, txStatus, value); 1837 1838 } 1839 1840 } 1841 1842 @SuppressWarnings("unused") 1843 public static void nativeCb_fmTxCmdSetPreEmphasisFilter(long contextValue, int status, 1844 long value) { 1845 1846 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPreEmphasisFilter: entered"); 1847 1848 JFmTx mJFmTx = getJFmTx(contextValue); 1849 1850 if (mJFmTx != null) { 1851 1852 ICallback callback = mJFmTx.callback; 1853 1854 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPreEmphasisFilter: converting callback args"); 1855 1856 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1857 1858 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPreEmphasisFilter: calling callback"); 1859 1860 callback.fmTxCmdSetPreEmphasisFilter(mJFmTx, txStatus, value); 1861 1862 } 1863 1864 } 1865 1866 @SuppressWarnings("unused") 1867 public static void nativeCb_fmTxCmdGetPreEmphasisFilter(long contextValue, int status, 1868 long value) { 1869 1870 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPreEmphasisFilter: entered"); 1871 1872 JFmTx mJFmTx = getJFmTx(contextValue); 1873 1874 if (mJFmTx != null) { 1875 1876 ICallback callback = mJFmTx.callback; 1877 1878 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPreEmphasisFilter: converting callback args"); 1879 1880 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1881 1882 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPreEmphasisFilter: calling callback"); 1883 1884 callback.fmTxCmdGetPreEmphasisFilter(mJFmTx, txStatus, value); 1885 1886 } 1887 1888 } 1889 1890 @SuppressWarnings("unused") 1891 public static void nativeCb_fmTxCmdSetMuteMode(long contextValue, int status, long value) { 1892 1893 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMuteMode: entered"); 1894 1895 JFmTx mJFmTx = getJFmTx(contextValue); 1896 1897 if (mJFmTx != null) { 1898 1899 ICallback callback = mJFmTx.callback; 1900 1901 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMuteMode: converting callback args"); 1902 1903 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1904 1905 JFmLog.d(TAG, "nativeCb_fmTxCmdSetMuteMode: calling callback"); 1906 1907 callback.fmTxCmdSetMuteMode(mJFmTx, txStatus, value); 1908 1909 } 1910 1911 } 1912 1913 @SuppressWarnings("unused") 1914 public static void nativeCb_fmTxCmdGetMuteMode(long contextValue, int status, long value) { 1915 1916 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMuteMode: entered"); 1917 1918 JFmTx mJFmTx = getJFmTx(contextValue); 1919 1920 if (mJFmTx != null) { 1921 1922 ICallback callback = mJFmTx.callback; 1923 1924 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMuteMode: converting callback args"); 1925 1926 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1927 1928 JFmLog.d(TAG, "nativeCb_fmTxCmdGetMuteMode: calling callback"); 1929 1930 callback.fmTxCmdGetMuteMode(mJFmTx, txStatus, value); 1931 1932 } 1933 1934 } 1935 1936 @SuppressWarnings("unused") 1937 public static void nativeCb_fmTxCmdSetRdsAfCode(long contextValue, int status, long value) { 1938 1939 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsAfCode: entered"); 1940 1941 JFmTx mJFmTx = getJFmTx(contextValue); 1942 1943 if (mJFmTx != null) { 1944 1945 ICallback callback = mJFmTx.callback; 1946 1947 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsAfCode: converting callback args"); 1948 1949 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1950 1951 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsAfCode: calling callback"); 1952 1953 callback.fmTxCmdSetMuteMode(mJFmTx, txStatus, value); 1954 1955 } 1956 1957 } 1958 1959 @SuppressWarnings("unused") 1960 public static void nativeCb_fmTxCmdGetRdsAfCode(long contextValue, int status, long value) { 1961 1962 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsAfCode: entered"); 1963 1964 JFmTx mJFmTx = getJFmTx(contextValue); 1965 1966 if (mJFmTx != null) { 1967 1968 ICallback callback = mJFmTx.callback; 1969 1970 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsAfCode: converting callback args"); 1971 1972 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1973 1974 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsAfCode: calling callback"); 1975 1976 callback.fmTxCmdGetRdsAfCode(mJFmTx, txStatus, value); 1977 1978 } 1979 1980 } 1981 1982 @SuppressWarnings("unused") 1983 public static void nativeCb_fmTxCmdSetRdsPiCode(long contextValue, int status, long value) { 1984 1985 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPiCode: entered"); 1986 1987 JFmTx mJFmTx = getJFmTx(contextValue); 1988 1989 if (mJFmTx != null) { 1990 1991 ICallback callback = mJFmTx.callback; 1992 1993 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPiCode: converting callback args"); 1994 1995 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 1996 1997 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPiCode: calling callback"); 1998 1999 callback.fmTxCmdSetRdsPiCode(mJFmTx, txStatus, value); 2000 2001 } 2002 2003 } 2004 2005 @SuppressWarnings("unused") 2006 public static void nativeCb_fmTxCmdGetRdsPiCode(long contextValue, int status, long value) { 2007 2008 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPiCode: entered"); 2009 2010 JFmTx mJFmTx = getJFmTx(contextValue); 2011 2012 if (mJFmTx != null) { 2013 2014 ICallback callback = mJFmTx.callback; 2015 2016 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPiCode: converting callback args"); 2017 2018 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2019 2020 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPiCode: calling callback"); 2021 2022 callback.fmTxCmdGetRdsPiCode(mJFmTx, txStatus, value); 2023 2024 } 2025 2026 } 2027 2028 @SuppressWarnings("unused") 2029 public static void nativeCb_fmTxCmdSetRdsPtyCode(long contextValue, int status, long value) { 2030 2031 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPtyCode: entered"); 2032 2033 JFmTx mJFmTx = getJFmTx(contextValue); 2034 2035 if (mJFmTx != null) { 2036 2037 ICallback callback = mJFmTx.callback; 2038 2039 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPtyCode: converting callback args"); 2040 2041 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2042 2043 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPtyCode: calling callback"); 2044 2045 callback.fmTxCmdSetRdsPtyCode(mJFmTx, txStatus, value); 2046 2047 } 2048 2049 } 2050 2051 @SuppressWarnings("unused") 2052 public static void nativeCb_fmTxCmdGetRdsPtyCode(long contextValue, int status, long value) { 2053 2054 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPtyCode: entered"); 2055 2056 JFmTx mJFmTx = getJFmTx(contextValue); 2057 2058 if (mJFmTx != null) { 2059 2060 ICallback callback = mJFmTx.callback; 2061 2062 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPtyCode: converting callback args"); 2063 2064 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2065 2066 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPtyCode: calling callback"); 2067 2068 callback.fmTxCmdGetRdsPtyCode(mJFmTx, txStatus, value); 2069 2070 } 2071 2072 } 2073 2074 @SuppressWarnings("unused") 2075 public static void nativeCb_fmTxCmdSetRdsTextRepertoire(long contextValue, int status, 2076 long value) { 2077 2078 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRepertoire: entered"); 2079 2080 JFmTx mJFmTx = getJFmTx(contextValue); 2081 2082 if (mJFmTx != null) { 2083 2084 ICallback callback = mJFmTx.callback; 2085 2086 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRepertoire: converting callback args"); 2087 2088 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2089 2090 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRepertoire: calling callback"); 2091 2092 callback.fmTxCmdSetRdsTextRepertoire(mJFmTx, txStatus, value); 2093 2094 } 2095 2096 } 2097 2098 @SuppressWarnings("unused") 2099 public static void nativeCb_fmTxCmdGetRdsTextRepertoire(long contextValue, int status, 2100 long value) { 2101 2102 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRepertoire: entered"); 2103 2104 JFmTx mJFmTx = getJFmTx(contextValue); 2105 2106 if (mJFmTx != null) { 2107 2108 ICallback callback = mJFmTx.callback; 2109 2110 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRepertoire: converting callback args"); 2111 2112 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2113 2114 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRepertoire: calling callback"); 2115 2116 callback.fmTxCmdGetRdsTextRepertoire(mJFmTx, txStatus, value); 2117 2118 } 2119 2120 } 2121 2122 @SuppressWarnings("unused") 2123 public static void nativeCb_fmTxCmdSetRdsPsDisplayMode(long contextValue, int status, long value) { 2124 2125 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplayMode: entered"); 2126 2127 JFmTx mJFmTx = getJFmTx(contextValue); 2128 2129 if (mJFmTx != null) { 2130 2131 ICallback callback = mJFmTx.callback; 2132 2133 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplayMode: converting callback args"); 2134 2135 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2136 2137 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplayMode: calling callback"); 2138 2139 callback.fmTxCmdSetRdsPsDisplayMode(mJFmTx, txStatus, value); 2140 2141 } 2142 2143 } 2144 2145 @SuppressWarnings("unused") 2146 public static void nativeCb_fmTxCmdGetRdsPsDisplayMode(long contextValue, int status, long value) { 2147 2148 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplayMode: entered"); 2149 2150 JFmTx mJFmTx = getJFmTx(contextValue); 2151 2152 if (mJFmTx != null) { 2153 2154 ICallback callback = mJFmTx.callback; 2155 2156 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplayMode: converting callback args"); 2157 2158 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2159 2160 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplayMode: calling callback"); 2161 2162 callback.fmTxCmdGetRdsPsDisplayMode(mJFmTx, txStatus, value); 2163 2164 } 2165 2166 } 2167 2168 @SuppressWarnings("unused") 2169 public static void nativeCb_fmTxCmdSetRdsPsDisplaySpeed(long contextValue, int status, 2170 long value) { 2171 2172 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplaySpeed: entered"); 2173 2174 JFmTx mJFmTx = getJFmTx(contextValue); 2175 2176 if (mJFmTx != null) { 2177 2178 ICallback callback = mJFmTx.callback; 2179 2180 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplaySpeed: converting callback args"); 2181 2182 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2183 2184 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDisplaySpeed: calling callback"); 2185 2186 callback.fmTxCmdSetRdsPsDisplaySpeed(mJFmTx, txStatus, value); 2187 2188 } 2189 2190 } 2191 2192 @SuppressWarnings("unused") 2193 public static void nativeCb_fmTxCmdGetRdsPsDisplaySpeed(long contextValue, int status, 2194 long value) { 2195 2196 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplaySpeed: entered"); 2197 2198 JFmTx mJFmTx = getJFmTx(contextValue); 2199 2200 if (mJFmTx != null) { 2201 2202 ICallback callback = mJFmTx.callback; 2203 2204 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplaySpeed: converting callback args"); 2205 2206 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2207 2208 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDisplaySpeed: calling callback"); 2209 2210 callback.fmTxCmdGetRdsPsDisplaySpeed(mJFmTx, txStatus, value); 2211 2212 } 2213 2214 } 2215 2216 @SuppressWarnings("unused") 2217 public static void nativeCb_fmTxCmdSetRdsTransmittedMask(long contextValue, int status, 2218 long value) { 2219 2220 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmittedMask: entered"); 2221 2222 JFmTx mJFmTx = getJFmTx(contextValue); 2223 2224 if (mJFmTx != null) { 2225 2226 ICallback callback = mJFmTx.callback; 2227 2228 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmittedMask: converting callback args"); 2229 2230 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2231 2232 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTransmittedMask: calling callback"); 2233 2234 callback.fmTxCmdSetRdsTransmittedMask(mJFmTx, txStatus, value); 2235 2236 } 2237 2238 } 2239 2240 @SuppressWarnings("unused") 2241 public static void nativeCb_fmTxCmdGetRdsTransmittedMask(long contextValue, int status, 2242 long value) { 2243 2244 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmittedMask: entered"); 2245 2246 JFmTx mJFmTx = getJFmTx(contextValue); 2247 2248 if (mJFmTx != null) { 2249 2250 ICallback callback = mJFmTx.callback; 2251 2252 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmittedMask: converting callback args"); 2253 2254 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2255 2256 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTransmittedMask: calling callback"); 2257 2258 callback.fmTxCmdGetRdsTransmittedMask(mJFmTx, txStatus, value); 2259 2260 } 2261 2262 } 2263 2264 @SuppressWarnings("unused") 2265 public static void nativeCb_fmTxCmdSetRdsMusicSpeechFlag(long contextValue, int status, 2266 long value) { 2267 2268 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsMusicSpeechFlag: entered"); 2269 2270 JFmTx mJFmTx = getJFmTx(contextValue); 2271 2272 if (mJFmTx != null) { 2273 2274 ICallback callback = mJFmTx.callback; 2275 2276 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsMusicSpeechFlag: converting callback args"); 2277 2278 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2279 2280 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsMusicSpeechFlag: calling callback"); 2281 2282 callback.fmTxCmdSetRdsMusicSpeechFlag(mJFmTx, txStatus, value); 2283 2284 } 2285 2286 } 2287 2288 @SuppressWarnings("unused") 2289 public static void nativeCb_fmTxCmdGetRdsMusicSpeechFlag(long contextValue, int status, 2290 long value) { 2291 2292 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsMusicSpeechFlag: entered"); 2293 2294 JFmTx mJFmTx = getJFmTx(contextValue); 2295 2296 if (mJFmTx != null) { 2297 2298 ICallback callback = mJFmTx.callback; 2299 2300 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsMusicSpeechFlag: converting callback args"); 2301 2302 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2303 2304 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsMusicSpeechFlag: calling callback"); 2305 2306 callback.fmTxCmdGetRdsMusicSpeechFlag(mJFmTx, txStatus, value); 2307 2308 } 2309 2310 } 2311 2312 @SuppressWarnings("unused") 2313 public static void nativeCb_fmTxCmdChangeAudioSource(long contextValue, int status, 2314 JFmCcmVacUnavailResourceList ccmVacUnavailResourceList) { 2315 2316 JFmLog.d(TAG, "nativeCb_fmTxCmdChangeAudioSource: entered"); 2317 2318 JFmTx mJFmTx = getJFmTx(contextValue); 2319 2320 if (mJFmTx != null) { 2321 2322 ICallback callback = mJFmTx.callback; 2323 2324 JFmLog.d(TAG, "nativeCb_fmTxCmdChangeAudioSource: converting callback args"); 2325 2326 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2327 2328 JFmLog.d(TAG, "nativeCb_fmTxCmdChangeAudioSource: calling callback"); 2329 2330 callback.fmTxCmdChangeAudioSource(mJFmTx, txStatus, ccmVacUnavailResourceList); 2331 2332 } 2333 2334 } 2335 2336 @SuppressWarnings("unused") 2337 public static void nativeCb_fmTxCmdSetRdsTrafficCodes(long contextValue, int status, 2338 int taCode, int tpCode) { 2339 2340 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTrafficCodes: entered"); 2341 2342 JFmTx mJFmTx = getJFmTx(contextValue); 2343 2344 if (mJFmTx != null) { 2345 2346 ICallback callback = mJFmTx.callback; 2347 2348 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTrafficCodes: converting callback args"); 2349 2350 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2351 2352 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTrafficCodes: calling callback"); 2353 2354 callback.fmTxCmdSetRdsTrafficCodes(mJFmTx, txStatus, taCode, tpCode); 2355 2356 } 2357 2358 } 2359 2360 @SuppressWarnings("unused") 2361 public static void nativeCb_fmTxCmdGetRdsTrafficCodes(long contextValue, int status, 2362 int taCode, int tpCode) { 2363 2364 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTrafficCodes: entered"); 2365 2366 JFmTx mJFmTx = getJFmTx(contextValue); 2367 2368 if (mJFmTx != null) { 2369 2370 ICallback callback = mJFmTx.callback; 2371 2372 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTrafficCodes: converting callback args"); 2373 2374 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2375 2376 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTrafficCodes: calling callback"); 2377 2378 callback.fmTxCmdGetRdsTrafficCodes(mJFmTx, txStatus, taCode, tpCode); 2379 2380 } 2381 2382 } 2383 2384 @SuppressWarnings("unused") 2385 public static void nativeCb_fmTxCmdSetRdsTextPsMsg(long contextValue, int status, int msgLen, 2386 byte[] msg) { 2387 2388 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextPsMsg: entered"); 2389 2390 JFmTx mJFmTx = getJFmTx(contextValue); 2391 2392 if (mJFmTx != null) { 2393 2394 ICallback callback = mJFmTx.callback; 2395 2396 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextPsMsg: converting callback args"); 2397 2398 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2399 2400 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextPsMsg: calling callback"); 2401 2402 callback.fmTxCmdSetRdsTextPsMsg(mJFmTx, txStatus, msgLen, msg); 2403 2404 } 2405 2406 } 2407 2408 @SuppressWarnings("unused") 2409 public static void nativeCb_fmTxCmdGetRdsTextPsMsg(long contextValue, int status, int msgLen, 2410 byte[] msg) { 2411 2412 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextPsMsg: entered"); 2413 2414 JFmTx mJFmTx = getJFmTx(contextValue); 2415 2416 if (mJFmTx != null) { 2417 2418 ICallback callback = mJFmTx.callback; 2419 2420 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextPsMsg: converting callback args"); 2421 2422 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2423 2424 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextPsMsg: calling callback"); 2425 2426 callback.fmTxCmdGetRdsTextPsMsg(mJFmTx, txStatus, msgLen, msg); 2427 2428 } 2429 2430 } 2431 2432 @SuppressWarnings("unused") 2433 public static void nativeCb_fmTxCmdSetRdsTextRtMsg(long contextValue, int status, int msgType, 2434 int msgLen, byte[] msg) { 2435 2436 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRtMsg: entered"); 2437 2438 JFmTx mJFmTx = getJFmTx(contextValue); 2439 2440 if (mJFmTx != null) { 2441 2442 ICallback callback = mJFmTx.callback; 2443 2444 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRtMsg: converting callback args"); 2445 2446 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2447 2448 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsTextRtMsg: calling callback"); 2449 2450 callback.fmTxCmdSetRdsTextRtMsg(mJFmTx, txStatus, msgType, msgLen, msg); 2451 2452 } 2453 2454 } 2455 2456 @SuppressWarnings("unused") 2457 public static void nativeCb_fmTxCmdGetRdsTextRtMsg(long contextValue, int status, int msgType, 2458 int msgLen, byte[] msg) { 2459 2460 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRtMsg: entered"); 2461 2462 JFmTx mJFmTx = getJFmTx(contextValue); 2463 2464 if (mJFmTx != null) { 2465 2466 ICallback callback = mJFmTx.callback; 2467 2468 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRtMsg: converting callback args"); 2469 2470 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2471 2472 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsTextRtMsg: calling callback"); 2473 2474 callback.fmTxCmdGetRdsTextRtMsg(mJFmTx, txStatus, msgType, msgLen, msg); 2475 2476 } 2477 2478 } 2479 2480 @SuppressWarnings("unused") 2481 public static void nativeCb_fmTxCmdSetInterruptMask(long contextValue, int status, long value) { 2482 2483 JFmLog.d(TAG, "nativeCb_fmTxCmdSetInterruptMask: entered"); 2484 2485 JFmTx mJFmTx = getJFmTx(contextValue); 2486 2487 if (mJFmTx != null) { 2488 2489 ICallback callback = mJFmTx.callback; 2490 2491 JFmLog.d(TAG, "nativeCb_fmTxCmdSetInterruptMask: converting callback args"); 2492 2493 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2494 2495 JFmLog.d(TAG, "nativeCb_fmTxCmdSetInterruptMask: calling callback"); 2496 2497 callback.fmTxCmdSetInterruptMask(mJFmTx, txStatus, value); 2498 2499 } 2500 2501 } 2502 2503 /* 2504 * @SuppressWarnings("unused") public static void 2505 * nativeCb_fmTxCmdGetInterruptMask(long contextValue, int status, long 2506 * value) { JFmLog.d(TAG, "nativeCb_fmTxCmdGetInterruptMask: entered"); 2507 * JFmTx mJFmTx = getJFmTx(contextValue); if (mJFmTx != null) { ICallback 2508 * callback = mJFmTx.callback; JFmLog.d(TAG, 2509 * "nativeCb_fmTxCmdGetInterruptMask: converting callback args"); 2510 * JFmLog.d(TAG, "nativeCb_fmTxCmdGetInterruptMask: calling callback"); 2511 * callback.fmTxCmdGetInterruptMask(mJFmTx, status, value); } } 2512 */ 2513 @SuppressWarnings("unused") 2514 public static void nativeCb_fmTxCmdSetRdsExtendedCountryCode(long contextValue, int status, 2515 long value) { 2516 2517 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsExtendedCountryCode: entered"); 2518 2519 JFmTx mJFmTx = getJFmTx(contextValue); 2520 2521 if (mJFmTx != null) { 2522 2523 ICallback callback = mJFmTx.callback; 2524 2525 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsExtendedCountryCode: converting callback args"); 2526 2527 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2528 2529 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsExtendedCountryCode: calling callback"); 2530 2531 callback.fmTxCmdSetRdsExtendedCountryCode(mJFmTx, txStatus, value); 2532 2533 } 2534 2535 } 2536 2537 @SuppressWarnings("unused") 2538 public static void nativeCb_fmTxCmdGetRdsExtendedCountryCode(long contextValue, int status, 2539 long value) { 2540 2541 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsExtendedCountryCode: entered"); 2542 2543 JFmTx mJFmTx = getJFmTx(contextValue); 2544 2545 if (mJFmTx != null) { 2546 2547 ICallback callback = mJFmTx.callback; 2548 2549 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsExtendedCountryCode: converting callback args"); 2550 2551 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2552 2553 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsExtendedCountryCode: calling callback"); 2554 2555 callback.fmTxCmdGetRdsExtendedCountryCode(mJFmTx, txStatus, value); 2556 2557 } 2558 2559 } 2560 2561 @SuppressWarnings("unused") 2562 public static void nativeCb_fmTxCmdChangeDigitalAudioConfiguration(long contextValue, 2563 int status, long value) { 2564 2565 JFmLog.d(TAG, "nativeCb_fmTxCmdChangeDigitalAudioConfiguration: entered"); 2566 2567 JFmTx mJFmTx = getJFmTx(contextValue); 2568 2569 if (mJFmTx != null) { 2570 2571 ICallback callback = mJFmTx.callback; 2572 2573 JFmLog.d(TAG, 2574 "nativeCb_fmTxCmdChangeDigitalAudioConfiguration: converting callback args"); 2575 2576 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2577 2578 JFmLog.d(TAG, "nativeCb_fmTxCmdChangeDigitalAudioConfiguration: calling callback"); 2579 2580 callback.fmTxCmdChangeDigitalAudioConfiguration(mJFmTx, txStatus, value); 2581 2582 } 2583 2584 } 2585 2586 @SuppressWarnings("unused") 2587 public static void nativeCb_fmTxCmdWriteRdsRawData(long contextValue, int status, int len, 2588 byte[] msg) { 2589 2590 JFmLog.d(TAG, "nativeCb_fmTxCmdWriteRdsRawData: entered"); 2591 2592 JFmTx mJFmTx = getJFmTx(contextValue); 2593 2594 if (mJFmTx != null) { 2595 2596 ICallback callback = mJFmTx.callback; 2597 2598 JFmLog.d(TAG, "nativeCb_fmTxCmdWriteRdsRawData: converting callback args"); 2599 2600 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2601 2602 JFmLog.d(TAG, "nativeCb_fmTxCmdWriteRdsRawData: calling callback"); 2603 2604 callback.fmTxCmdWriteRdsRawData(mJFmTx, txStatus, len, msg); 2605 2606 } 2607 2608 } 2609 2610 @SuppressWarnings("unused") 2611 public static void nativeCb_fmTxCmdReadRdsRawData(long contextValue, int status, int len, 2612 byte[] msg) { 2613 2614 JFmLog.d(TAG, "nativeCb_fmTxCmdReadRdsRawData: entered"); 2615 2616 JFmTx mJFmTx = getJFmTx(contextValue); 2617 2618 if (mJFmTx != null) { 2619 2620 ICallback callback = mJFmTx.callback; 2621 2622 JFmLog.d(TAG, "nativeCb_fmTxCmdReadRdsRawData: converting callback args"); 2623 2624 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2625 2626 JFmLog.d(TAG, "nativeCb_fmTxCmdReadRdsRawData: calling callback"); 2627 2628 callback.fmTxCmdReadRdsRawData(mJFmTx, txStatus, len, msg); 2629 2630 } 2631 2632 } 2633 2634 @SuppressWarnings("unused") 2635 public static void nativeCb_fmTxCmdSetPowerLevel(long contextValue, int status, long value) { 2636 2637 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPowerLevel: entered"); 2638 2639 JFmTx mJFmTx = getJFmTx(contextValue); 2640 2641 if (mJFmTx != null) { 2642 2643 ICallback callback = mJFmTx.callback; 2644 2645 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPowerLevel: converting callback args"); 2646 2647 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2648 2649 JFmLog.d(TAG, "nativeCb_fmTxCmdSetPowerLevel: calling callback"); 2650 2651 callback.fmTxCmdSetPowerLevel(mJFmTx, txStatus, value); 2652 2653 } 2654 2655 } 2656 2657 @SuppressWarnings("unused") 2658 public static void nativeCb_fmTxCmdGetPowerLevel(long contextValue, int status, long value) { 2659 2660 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPowerLevel: entered"); 2661 2662 JFmTx mJFmTx = getJFmTx(contextValue); 2663 2664 if (mJFmTx != null) { 2665 2666 ICallback callback = mJFmTx.callback; 2667 2668 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPowerLevel: converting callback args"); 2669 2670 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2671 2672 JFmLog.d(TAG, "nativeCb_fmTxCmdGetPowerLevel: calling callback"); 2673 2674 callback.fmTxCmdGetPowerLevel(mJFmTx, txStatus, value); 2675 2676 } 2677 2678 } 2679 2680 @SuppressWarnings("unused") 2681 public static void nativeCb_fmTxCmdSetRdsPsDispalyMode(long contextValue, int status, long value) { 2682 2683 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDispalyMode: entered"); 2684 2685 JFmTx mJFmTx = getJFmTx(contextValue); 2686 2687 if (mJFmTx != null) { 2688 2689 ICallback callback = mJFmTx.callback; 2690 2691 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDispalyMode: converting callback args"); 2692 2693 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2694 2695 JFmLog.d(TAG, "nativeCb_fmTxCmdSetRdsPsDispalyMode: calling callback"); 2696 2697 callback.fmTxCmdSetRdsPsDispalyMode(mJFmTx, txStatus, value); 2698 2699 } 2700 2701 } 2702 2703 @SuppressWarnings("unused") 2704 public static void nativeCb_fmTxCmdGetRdsPsDispalyMode(long contextValue, int status, long value) { 2705 2706 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDispalyMode: entered"); 2707 2708 JFmTx mJFmTx = getJFmTx(contextValue); 2709 2710 if (mJFmTx != null) { 2711 2712 ICallback callback = mJFmTx.callback; 2713 2714 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDispalyMode: converting callback args"); 2715 2716 JFmTxStatus txStatus = JFmUtils.getEnumConst(JFmTxStatus.class, status); 2717 2718 JFmLog.d(TAG, "nativeCb_fmTxCmdGetRdsPsDispalyMode: calling callback"); 2719 2720 callback.fmTxCmdGetRdsPsDispalyMode(mJFmTx, txStatus, value); 2721 2722 } 2723 2724 } 2725 2726 /****************************************************************************************** 2727 * Private utility functions 2728 *******************************************************************************************/ 2729 2730 private static JFmTx getJFmTx(long contextValue) { 2731 JFmTx jFmTx; 2732 2733 JFmContext profileContext = new JFmContext(contextValue); 2734 2735 if (mTxContextsTable.containsKey(profileContext)) { 2736 jFmTx = mTxContextsTable.get(profileContext); 2737 } else { 2738 JFmLog.e(TAG, "JFmTx: Failed mapping context " + contextValue + " to a callback"); 2739 jFmTx = null; 2740 } 2741 2742 return jFmTx; 2743 } 2744 2745 } /* End class */ 2746