001package jmri; 002 003import javax.annotation.Nonnull; 004 005import jmri.beans.PropertyChangeProvider; 006 007/** 008 * A Throttle object can be manipulated to change the speed, direction and 009 * functions of a single locomotive. 010 * <p> 011 * A Throttle implementation provides the actual control mechanism. These are 012 * obtained via a {@link ThrottleManager}. 013 * <p> 014 * With some control systems, there are only a limited number of Throttle's 015 * available. 016 * <p> 017 * On DCC systems, Throttles are often actually {@link DccThrottle} objects, 018 * which have some additional DCC-specific capabilities. 019 * <p> 020 * {@link java.beans.PropertyChangeEvent}s that can be listened to include 021 * <ul> 022 * <li>SpeedSetting, SpeedSteps, isForward 023 * <li>F0, F1, F2 .. F27, F28, F29, F30 .. 024 * <li>F0Momentary, F1Momentary, F2Momentary .. F28Momentary .. F29Momentary .. 025 * <li>ThrottleAssigned, throttleRemoved, throttleConnected, 026 * throttleNotFoundInRemoval 027 * <li>DispatchEnabled, ReleaseEnabled 028 * </ul> 029 * 030 * @author Bob Jacobsen Copyright (C) 2001, 2008 031 */ 032public interface Throttle extends PropertyChangeProvider { 033 034 /** 035 * Constant used in getThrottleInfo. 036 */ 037 static final String SPEEDSTEPMODE = "SpeedStepsMode"; // speed steps NOI18N 038 039 /* 040 * Properties strings sent to property change listeners 041 */ 042 043 /** 044 * Constant sent by Throttle on Property Change. 045 */ 046 static final String SPEEDSTEPS = "SpeedSteps"; // speed steps NOI18N 047 048 static final String SPEEDSETTING = "SpeedSetting"; // speed setting NOI18N 049 static final String ISFORWARD = "IsForward"; // direction setting NOI18N 050 static final String SPEEDINCREMENT = "SpeedIncrement"; // direction setting NOI18N 051 052 /** 053 * Constants to represent the functions F0 through F28. 054 * @deprecated Use {@code getFunctionString(int momentFunctionNum) } instead. 055 */ 056 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 057 static final String F0 = "F0"; // NOI18N 058 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 059 static final String F1 = "F1"; // NOI18N 060 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 061 static final String F2 = "F2"; // NOI18N 062 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 063 static final String F3 = "F3"; // NOI18N 064 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 065 static final String F4 = "F4"; // NOI18N 066 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 067 static final String F5 = "F5"; // NOI18N 068 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 069 static final String F6 = "F6"; // NOI18N 070 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 071 static final String F7 = "F7"; // NOI18N 072 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 073 static final String F8 = "F8"; // NOI18N 074 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 075 static final String F9 = "F9"; // NOI18N 076 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 077 static final String F10 = "F10"; // NOI18N 078 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 079 static final String F11 = "F11"; // NOI18N 080 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 081 static final String F12 = "F12"; // NOI18N 082 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 083 static final String F13 = "F13"; // NOI18N 084 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 085 static final String F14 = "F14"; // NOI18N 086 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 087 static final String F15 = "F15"; // NOI18N 088 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 089 static final String F16 = "F16"; // NOI18N 090 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 091 static final String F17 = "F17"; // NOI18N 092 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 093 static final String F18 = "F18"; // NOI18N 094 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 095 static final String F19 = "F19"; // NOI18N 096 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 097 static final String F20 = "F20"; // NOI18N 098 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 099 static final String F21 = "F21"; // NOI18N 100 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 101 static final String F22 = "F22"; // NOI18N 102 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 103 static final String F23 = "F23"; // NOI18N 104 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 105 static final String F24 = "F24"; // NOI18N 106 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 107 static final String F25 = "F25"; // NOI18N 108 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 109 static final String F26 = "F26"; // NOI18N 110 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 111 static final String F27 = "F27"; // NOI18N 112 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 113 static final String F28 = "F28"; // NOI18N 114 115 /** 116 * Constants to represent the functions F0 through F28. 117 * @deprecated Use {@code getFunctionMomentaryString(int momentFunctionNum) } instead. 118 */ 119 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 120 static final String F0Momentary = "F0Momentary"; // NOI18N 121 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 122 static final String F1Momentary = "F1Momentary"; // NOI18N 123 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 124 static final String F2Momentary = "F2Momentary"; // NOI18N 125 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 126 static final String F3Momentary = "F3Momentary"; // NOI18N 127 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 128 static final String F4Momentary = "F4Momentary"; // NOI18N 129 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 130 static final String F5Momentary = "F5Momentary"; // NOI18N 131 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 132 static final String F6Momentary = "F6Momentary"; // NOI18N 133 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 134 static final String F7Momentary = "F7Momentary"; // NOI18N 135 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 136 static final String F8Momentary = "F8Momentary"; // NOI18N 137 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 138 static final String F9Momentary = "F9Momentary"; // NOI18N 139 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 140 static final String F10Momentary = "F10Momentary"; // NOI18N 141 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 142 static final String F11Momentary = "F11Momentary"; // NOI18N 143 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 144 static final String F12Momentary = "F12Momentary"; // NOI18N 145 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 146 static final String F13Momentary = "F13Momentary"; // NOI18N 147 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 148 static final String F14Momentary = "F14Momentary"; // NOI18N 149 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 150 static final String F15Momentary = "F15Momentary"; // NOI18N 151 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 152 static final String F16Momentary = "F16Momentary"; // NOI18N 153 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 154 static final String F17Momentary = "F17Momentary"; // NOI18N 155 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 156 static final String F18Momentary = "F18Momentary"; // NOI18N 157 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 158 static final String F19Momentary = "F19Momentary"; // NOI18N 159 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 160 static final String F20Momentary = "F20Momentary"; // NOI18N 161 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 162 static final String F21Momentary = "F21Momentary"; // NOI18N 163 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 164 static final String F22Momentary = "F22Momentary"; // NOI18N 165 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 166 static final String F23Momentary = "F23Momentary"; // NOI18N 167 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 168 static final String F24Momentary = "F24Momentary"; // NOI18N 169 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 170 static final String F25Momentary = "F25Momentary"; // NOI18N 171 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 172 static final String F26Momentary = "F26Momentary"; // NOI18N 173 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 174 static final String F27Momentary = "F27Momentary"; // NOI18N 175 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 176 static final String F28Momentary = "F28Momentary"; // NOI18N 177 178 /** 179 * Get the Function String for a particular Function number. 180 * Commonly used string in Throttle property change listeners. 181 * @param functionNum Function Number, minimum 0. 182 * @return function string, e.g. "F0" or "F7". 183 */ 184 static String getFunctionString(int functionNum){ 185 StringBuilder sb = new StringBuilder(3); 186 sb.append("F"); // NOI18N 187 sb.append(functionNum); 188 return sb.toString(); 189 } 190 191 /** 192 * Get the Momentary Function String for a particular Function number. 193 * Commonly used string in Throttle property change listeners. 194 * @param momentFunctionNum Momentary Function Number, minimum 0. 195 * @return momentary function string, e.g. "F0Momentary" or "F7Momentary". 196 */ 197 static String getFunctionMomentaryString(int momentFunctionNum){ 198 StringBuilder sb = new StringBuilder(12); 199 sb.append("F"); // NOI18N 200 sb.append(momentFunctionNum); 201 sb.append("Momentary"); // NOI18N 202 return sb.toString(); 203 } 204 205 /** 206 * Get copy of function array. 207 * Typically returns array length of 29, i.e. 0-28. 208 * @return function array, length dependant by hardware type. 209 */ 210 @Nonnull 211 abstract boolean[] getFunctions(); 212 213 /** 214 * Get copy of function momentary status array. 215 * Typically returns array length of 29, i.e. 0-28. 216 * @return momentary function array, length dependant by hardware type. 217 */ 218 @Nonnull 219 abstract boolean[] getFunctionsMomentary(); 220 221 /** 222 * Get the current speed setting, expressed as a value {@literal 0.0 -> 1.0.} 223 * This property is bound to the {@link #SPEEDSETTING} name. 224 * 225 * @return the speed as a {@literal 0.0 -> 1.0.} fraction of maximum possible speed or -1 for emergency stop. 226 */ 227 float getSpeedSetting(); 228 229 /** 230 * Set the desired speed setting, expressed as a value {@literal 0.0 -> 1.0.} Negative means 231 * emergency stop. 232 * This property is bound to the {@link #SPEEDSETTING} name. 233 * 234 * @param speed the speed as a {@literal 0.0 -> 1.0.} fraction of maximum possible speed or -1 for emergency stop. 235 */ 236 void setSpeedSetting(float speed); 237 238 /** 239 * Set the desired speed, expressed as a value {@literal 0.0 -> 1.0.}, 240 * with extra control over the messages to the layout. Negative means 241 * emergency stop. 242 * On systems which normally suppress the sending of a 243 * message if the new speed won't (appear to JMRI to) make any difference, 244 * the two extra options allow the calling method to insist the message is 245 * sent under some circumstances. 246 * 247 * @param speed the speed as a {@literal 0.0 -> 1.0.} fraction of maximum possible speed or -1 for emergency stop. 248 * @param allowDuplicates if true, don't suppress messages that should 249 * have no effect 250 * @param allowDuplicatesOnStop if true, and the new speed is idle or estop, 251 * don't suppress messages 252 */ 253 void setSpeedSetting(float speed, boolean allowDuplicates, boolean allowDuplicatesOnStop); 254 255 /** 256 * Set the speed, and on systems which normally suppress the sending of a 257 * message make sure the message gets sent. 258 * 259 * @param speed the speed as a {@literal 0.0 -> 1.0.} fraction of maximum possible speed or -1 for emergency stop. 260 */ 261 void setSpeedSettingAgain(float speed); 262 263 /** 264 * direction This is an bound property. 265 * 266 * @return true if forward, false if reverse or undefined 267 */ 268 boolean getIsForward(); 269 270 /** 271 * Set direction. 272 * 273 * @param forward true if forward, false if reverse or undefined 274 */ 275 void setIsForward(boolean forward); 276 277 // functions - note that we use the naming for DCC, though that's not the implication; 278 // see also DccThrottle interface 279 280 /** 281 * Set Loco Function and send to Layout. 282 * @param functionNum Function Number, 0-28 283 * @param newState New Function State. True on, false off. 284 */ 285 abstract void setFunction(int functionNum, boolean newState); 286 287 /** 288 * Get Loco Function status. 289 * @param functionNum Function Number, 0-28 290 * @return Function State. True on, false off. 291 */ 292 boolean getFunction(int functionNum); 293 294 /** 295 * Set Momentary Loco Function and send to Layout. 296 * @param momFuncNum Momentary Function Number, 0-28 297 * @param state New Function State. True on, false off. 298 */ 299 abstract void setFunctionMomentary(int momFuncNum, boolean state); 300 301 /** 302 * Get the Momentary Function Value. 303 * @param fN Momentary function number 304 * @return true if momentary function is on, else false. 305 */ 306 abstract boolean getFunctionMomentary(int fN); 307 308 /** 309 * Get Function 0 Status. 310 * @return true for Function On, false for Function Off. 311 * @deprecated Use {@code getFunction(int functionNum) } instead. 312 */ 313 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 314 default boolean getF0() { 315 return getFunction(0); 316 } 317 318 /** 319 * Get Function 1 Status. 320 * @return true for Function On, false for Function Off. 321 * @deprecated Use {@code getFunction(int functionNum) } instead. 322 */ 323 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 324 default boolean getF1() { 325 return getFunction(1); 326 } 327 328 /** 329 * Get Function 2 Status. 330 * @return true for Function On, false for Function Off. 331 * @deprecated Use {@code getFunction(int functionNum) } instead. 332 */ 333 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 334 default boolean getF2() { 335 return getFunction(2); 336 } 337 338 /** 339 * Get Function 3 Status. 340 * @return true for Function On, false for Function Off. 341 * @deprecated Use {@code getFunction(int functionNum) } instead. 342 */ 343 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 344 default boolean getF3() { 345 return getFunction(3); 346 } 347 348 /** 349 * Get Function 4 Status. 350 * @return true for Function On, false for Function Off. 351 * @deprecated Use {@code getFunction(int functionNum) } instead. 352 */ 353 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 354 default boolean getF4() { 355 return getFunction(4); 356 } 357 358 /** 359 * Get Function 5 Status. 360 * @return true for Function On, false for Function Off. 361 * @deprecated Use {@code getFunction(int functionNum) } instead. 362 */ 363 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 364 default boolean getF5() { 365 return getFunction(5); 366 } 367 368 /** 369 * Get Function 6 Status. 370 * @return true for Function On, false for Function Off. 371 * @deprecated Use {@code getFunction(int functionNum) } instead. 372 */ 373 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 374 default boolean getF6() { 375 return getFunction(6); 376 } 377 378 /** 379 * Get Function 7 Status. 380 * @return true for Function On, false for Function Off. 381 * @deprecated Use {@code getFunction(int functionNum) } instead. 382 */ 383 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 384 default boolean getF7() { 385 return getFunction(7); 386 } 387 388 /** 389 * Get Function 8 Status. 390 * @return true for Function On, false for Function Off. 391 * @deprecated Use {@code getFunction(int functionNum) } instead. 392 */ 393 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 394 default boolean getF8() { 395 return getFunction(8); 396 } 397 398 /** 399 * Get Function 9 Status. 400 * @return true for Function On, false for Function Off. 401 * @deprecated Use {@code getFunction(int functionNum) } instead. 402 */ 403 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 404 default boolean getF9() { 405 return getFunction(9); 406 } 407 408 /** 409 * Get Function 10 Status. 410 * @return true for Function On, false for Function Off. 411 * @deprecated Use {@code getFunction(int functionNum) } instead. 412 */ 413 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 414 default boolean getF10() { 415 return getFunction(10); 416 } 417 418 /** 419 * Get Function 11 Status. 420 * @return true for Function On, false for Function Off. 421 * @deprecated Use {@code getFunction(int functionNum) } instead. 422 */ 423 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 424 default boolean getF11() { 425 return getFunction(11); 426 } 427 428 /** 429 * Get Function 12 Status. 430 * @return true for Function On, false for Function Off. 431 * @deprecated Use {@code getFunction(int functionNum) } instead. 432 */ 433 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 434 default boolean getF12() { 435 return getFunction(12); 436 } 437 438 /** 439 * Get Function 13 Status. 440 * @return true for Function On, false for Function Off. 441 * @deprecated Use {@code getFunction(int functionNum) } instead. 442 */ 443 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 444 default boolean getF13() { 445 return getFunction(13); 446 } 447 448 /** 449 * Get Function 14 Status. 450 * @return true for Function On, false for Function Off. 451 * @deprecated Use {@code getFunction(int functionNum) } instead. 452 */ 453 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 454 default boolean getF14() { 455 return getFunction(14); 456 } 457 458 /** 459 * Get Function 15 Status. 460 * @return true for Function On, false for Function Off. 461 * @deprecated Use {@code getFunction(int functionNum) } instead. 462 */ 463 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 464 default boolean getF15() { 465 return getFunction(15); 466 } 467 468 /** 469 * Get Function 16 Status. 470 * @return true for Function On, false for Function Off. 471 * @deprecated Use {@code getFunction(int functionNum) } instead. 472 */ 473 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 474 default boolean getF16() { 475 return getFunction(16); 476 } 477 478 /** 479 * Get Function 17 Status. 480 * @return true for Function On, false for Function Off. 481 * @deprecated Use {@code getFunction(int functionNum) } instead. 482 */ 483 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 484 default boolean getF17() { 485 return getFunction(17); 486 } 487 488 /** 489 * Get Function 18 Status. 490 * @return true for Function On, false for Function Off. 491 * @deprecated Use {@code getFunction(int functionNum) } instead. 492 */ 493 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 494 default boolean getF18() { 495 return getFunction(18); 496 } 497 498 /** 499 * Get Function 19 Status. 500 * @return true for Function On, false for Function Off. 501 * @deprecated Use {@code getFunction(int functionNum) } instead. 502 */ 503 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 504 default boolean getF19() { 505 return getFunction(19); 506 } 507 508 /** 509 * Get Function 20 Status. 510 * @return true for Function On, false for Function Off. 511 * @deprecated Use {@code getFunction(int functionNum) } instead. 512 */ 513 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 514 default boolean getF20() { 515 return getFunction(20); 516 } 517 518 /** 519 * Get Function 21 Status. 520 * @return true for Function On, false for Function Off. 521 * @deprecated Use {@code getFunction(int functionNum) } instead. 522 */ 523 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 524 default boolean getF21() { 525 return getFunction(21); 526 } 527 528 /** 529 * Get Function 22 Status. 530 * @return true for Function On, false for Function Off. 531 * @deprecated Use {@code getFunction(int functionNum) } instead. 532 */ 533 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 534 default boolean getF22() { 535 return getFunction(22); 536 } 537 538 /** 539 * Get Function 23 Status. 540 * @return true for Function On, false for Function Off. 541 * @deprecated Use {@code getFunction(int functionNum) } instead. 542 */ 543 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 544 default boolean getF23() { 545 return getFunction(23); 546 } 547 548 /** 549 * Get Function 24 Status. 550 * @return true for Function On, false for Function Off. 551 * @deprecated Use {@code getFunction(int functionNum) } instead. 552 */ 553 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 554 default boolean getF24() { 555 return getFunction(24); 556 } 557 558 /** 559 * Get Function 25 Status. 560 * @return true for Function On, false for Function Off. 561 * @deprecated Use {@code getFunction(int functionNum) } instead. 562 */ 563 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 564 default boolean getF25() { 565 return getFunction(25); 566 } 567 568 /** 569 * Get Function 26 Status. 570 * @return true for Function On, false for Function Off. 571 * @deprecated Use {@code getFunction(int functionNum) } instead. 572 */ 573 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 574 default boolean getF26() { 575 return getFunction(26); 576 } 577 578 /** 579 * Get Function 27 Status. 580 * @return true for Function On, false for Function Off. 581 * @deprecated Use {@code getFunction(int functionNum) } instead. 582 */ 583 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 584 default boolean getF27() { 585 return getFunction(27); 586 } 587 588 /** 589 * Get Function 28 Status. 590 * @return true for Function On, false for Function Off. 591 * @deprecated Use {@code getFunction(int functionNum) } instead. 592 */ 593 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 594 default boolean getF28() { 595 return getFunction(28); 596 } 597 598 /** 599 * Set Function 0 Status. 600 * @param f0 true for Function On, false for Function Off. 601 * @deprecated Use {@code setFunction(int functionNum) } instead. 602 */ 603 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 604 default void setF0(boolean f0) { 605 setFunction(0,f0); 606 } 607 608 /** 609 * Set Function 1 Status. 610 * @param f1 true for Function On, false for Function Off. 611 * @deprecated Use {@code setFunction(int functionNum) } instead. 612 */ 613 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 614 default void setF1(boolean f1) { 615 setFunction(1,f1); 616 } 617 618 /** 619 * Set Function 2 Status. 620 * @param f2 true for Function On, false for Function Off. 621 * @deprecated Use {@code setFunction(int functionNum) } instead. 622 */ 623 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 624 default void setF2(boolean f2) { 625 setFunction(2,f2); 626 } 627 628 /** 629 * Set Function 3 Status. 630 * @param f3 true for Function On, false for Function Off. 631 * @deprecated Use {@code setFunction(int functionNum) } instead. 632 */ 633 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 634 default void setF3(boolean f3) { 635 setFunction(3,f3); 636 } 637 638 /** 639 * Set Function 4 Status. 640 * @param f4 true for Function On, false for Function Off. 641 * @deprecated Use {@code setFunction(int functionNum) } instead. 642 */ 643 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 644 default void setF4(boolean f4) { 645 setFunction(4,f4); 646 } 647 648 /** 649 * Set Function 5 Status. 650 * @param f5 true for Function On, false for Function Off. 651 * @deprecated Use {@code setFunction(int functionNum) } instead. 652 */ 653 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 654 default void setF5(boolean f5) { 655 setFunction(5,f5); 656 } 657 658 /** 659 * Set Function 6 Status. 660 * @param f6 true for Function On, false for Function Off. 661 * @deprecated Use {@code setFunction(int functionNum) } instead. 662 */ 663 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 664 default void setF6(boolean f6) { 665 setFunction(6,f6); 666 } 667 668 /** 669 * Set Function 7 Status. 670 * @param f7 true for Function On, false for Function Off. 671 * @deprecated Use {@code setFunction(int functionNum) } instead. 672 */ 673 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 674 default void setF7(boolean f7) { 675 setFunction(7,f7); 676 } 677 678 /** 679 * Set Function 8 Status. 680 * @param f8 true for Function On, false for Function Off. 681 * @deprecated Use {@code setFunction(int functionNum) } instead. 682 */ 683 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 684 default void setF8(boolean f8) { 685 setFunction(8,f8); 686 } 687 688 /** 689 * Set Function 9 Status. 690 * @param f9 true for Function On, false for Function Off. 691 * @deprecated Use {@code setFunction(int functionNum) } instead. 692 */ 693 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 694 default void setF9(boolean f9) { 695 setFunction(9,f9); 696 } 697 698 /** 699 * Set Function 10 Status. 700 * @param f10 true for Function On, false for Function Off. 701 * @deprecated Use {@code setFunction(int functionNum) } instead. 702 */ 703 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 704 default void setF10(boolean f10) { 705 setFunction(10,f10); 706 } 707 708 /** 709 * Set Function 11 Status. 710 * @param f11 true for Function On, false for Function Off. 711 * @deprecated Use {@code setFunction(int functionNum) } instead. 712 */ 713 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 714 default void setF11(boolean f11) { 715 setFunction(11,f11); 716 } 717 718 /** 719 * Set Function 12 Status. 720 * @param f12 true for Function On, false for Function Off. 721 * @deprecated Use {@code setFunction(int functionNum) } instead. 722 */ 723 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 724 default void setF12(boolean f12) { 725 setFunction(12,f12); 726 } 727 728 /** 729 * Set Function 13 Status. 730 * @param f13 true for Function On, false for Function Off. 731 * @deprecated Use {@code setFunction(int functionNum) } instead. 732 */ 733 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 734 default void setF13(boolean f13) { 735 setFunction(13,f13); 736 } 737 738 /** 739 * Set Function 14 Status. 740 * @param f14 true for Function On, false for Function Off. 741 * @deprecated Use {@code setFunction(int functionNum) } instead. 742 */ 743 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 744 default void setF14(boolean f14) { 745 setFunction(14,f14); 746 } 747 748 /** 749 * Set Function 15 Status. 750 * @param f15 true for Function On, false for Function Off. 751 * @deprecated Use {@code setFunction(int functionNum) } instead. 752 */ 753 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 754 default void setF15(boolean f15) { 755 setFunction(15,f15); 756 } 757 758 /** 759 * Set Function 16 Status. 760 * @param f16 true for Function On, false for Function Off. 761 * @deprecated Use {@code setFunction(int functionNum) } instead. 762 */ 763 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 764 default void setF16(boolean f16) { 765 setFunction(16,f16); 766 } 767 768 /** 769 * Set Function 17 Status. 770 * @param f17 true for Function On, false for Function Off. 771 * @deprecated Use {@code setFunction(int functionNum) } instead. 772 */ 773 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 774 default void setF17(boolean f17) { 775 setFunction(17,f17); 776 } 777 778 /** 779 * Set Function 18 Status. 780 * @param f18 true for Function On, false for Function Off. 781 * @deprecated Use {@code setFunction(int functionNum) } instead. 782 */ 783 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 784 default void setF18(boolean f18) { 785 setFunction(18,f18); 786 } 787 788 /** 789 * Set Function 19 Status. 790 * @param f19 true for Function On, false for Function Off. 791 * @deprecated Use {@code setFunction(int functionNum) } instead. 792 */ 793 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 794 default void setF19(boolean f19) { 795 setFunction(19,f19); 796 } 797 798 /** 799 * Set Function 20 Status. 800 * @param f20 true for Function On, false for Function Off. 801 * @deprecated Use {@code setFunction(int functionNum) } instead. 802 */ 803 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 804 default void setF20(boolean f20) { 805 setFunction(20,f20); 806 } 807 808 /** 809 * Set Function 21 Status. 810 * @param f21 true for Function On, false for Function Off. 811 * @deprecated Use {@code setFunction(int functionNum) } instead. 812 */ 813 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 814 default void setF21(boolean f21) { 815 setFunction(21,f21); 816 } 817 818 /** 819 * Set Function 22 Status. 820 * @param f22 true for Function On, false for Function Off. 821 * @deprecated Use {@code setFunction(int functionNum) } instead. 822 */ 823 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 824 default void setF22(boolean f22) { 825 setFunction(22,f22); 826 } 827 828 /** 829 * Set Function 23 Status. 830 * @param f23 true for Function On, false for Function Off. 831 * @deprecated Use {@code setFunction(int functionNum) } instead. 832 */ 833 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 834 default void setF23(boolean f23) { 835 setFunction(23,f23); 836 } 837 838 /** 839 * Set Function 24 Status. 840 * @param f24 true for Function On, false for Function Off. 841 * @deprecated Use {@code setFunction(int functionNum) } instead. 842 */ 843 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 844 default void setF24(boolean f24) { 845 setFunction(24,f24); 846 } 847 848 /** 849 * Set Function 25 Status. 850 * @param f25 true for Function On, false for Function Off. 851 * @deprecated Use {@code setFunction(int functionNum) } instead. 852 */ 853 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 854 default void setF25(boolean f25) { 855 setFunction(25,f25); 856 } 857 858 /** 859 * Set Function 26 Status. 860 * @param f26 true for Function On, false for Function Off. 861 * @deprecated Use {@code setFunction(int functionNum) } instead. 862 */ 863 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 864 default void setF26(boolean f26) { 865 setFunction(26,f26); 866 } 867 868 /** 869 * Set Function 27 Status. 870 * @param f27 true for Function On, false for Function Off. 871 * @deprecated Use {@code setFunction(int functionNum) } instead. 872 */ 873 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 874 default void setF27(boolean f27) { 875 setFunction(27,f27); 876 } 877 878 /** 879 * Set Function 28 Status. 880 * @param f28 true for Function On, false for Function Off. 881 * @deprecated Use {@code setFunction(int functionNum) } instead. 882 */ 883 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 884 default void setF28(boolean f28) { 885 setFunction(28,f28); 886 } 887 888 // functions momentary status - note that we use the naming for DCC, 889 // though that's not the implication; 890 // see also DccThrottle interface 891 892 /** 893 * Get Momentary Function 0 Status. 894 * @return true for Momentary Function On, else false. 895 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 896 */ 897 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 898 default boolean getF0Momentary() { 899 return getFunctionMomentary(0); 900 } 901 902 /** 903 * Get Momentary Function 1 Status. 904 * @return true for Momentary Function On, else false. 905 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 906 */ 907 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 908 default boolean getF1Momentary() { 909 return getFunctionMomentary(1); 910 } 911 912 /** 913 * Get Momentary Function 2 Status. 914 * @return true for Momentary Function On, else false. 915 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 916 */ 917 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 918 default boolean getF2Momentary() { 919 return getFunctionMomentary(2); 920 } 921 922 /** 923 * Get Momentary Function 3 Status. 924 * @return true for Momentary Function On, else false. 925 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 926 */ 927 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 928 default boolean getF3Momentary() { 929 return getFunctionMomentary(3); 930 } 931 932 /** 933 * Get Momentary Function 4 Status. 934 * @return true for Momentary Function On, else false. 935 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 936 */ 937 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 938 default boolean getF4Momentary() { 939 return getFunctionMomentary(4); 940 } 941 942 /** 943 * Get Momentary Function 5 Status. 944 * @return true for Momentary Function On, else false. 945 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 946 */ 947 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 948 default boolean getF5Momentary() { 949 return getFunctionMomentary(5); 950 } 951 952 /** 953 * Get Momentary Function 6 Status. 954 * @return true for Momentary Function On, else false. 955 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 956 */ 957 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 958 default boolean getF6Momentary() { 959 return getFunctionMomentary(6); 960 } 961 962 /** 963 * Get Momentary Function 7 Status. 964 * @return true for Momentary Function On, else false. 965 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 966 */ 967 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 968 default boolean getF7Momentary() { 969 return getFunctionMomentary(7); 970 } 971 972 /** 973 * Get Momentary Function 8 Status. 974 * @return true for Momentary Function On, else false. 975 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 976 */ 977 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 978 default boolean getF8Momentary() { 979 return getFunctionMomentary(8); 980 } 981 982 /** 983 * Get Momentary Function 9 Status. 984 * @return true for Momentary Function On, else false. 985 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 986 */ 987 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 988 default boolean getF9Momentary() { 989 return getFunctionMomentary(9); 990 } 991 992 /** 993 * Get Momentary Function 10 Status. 994 * @return true for Momentary Function On, else false. 995 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 996 */ 997 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 998 default boolean getF10Momentary() { 999 return getFunctionMomentary(10); 1000 } 1001 1002 /** 1003 * Get Momentary Function 11 Status. 1004 * @return true for Momentary Function On, else false. 1005 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1006 */ 1007 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1008 default boolean getF11Momentary() { 1009 return getFunctionMomentary(11); 1010 } 1011 1012 /** 1013 * Get Momentary Function 12 Status. 1014 * @return true for Momentary Function On, else false. 1015 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1016 */ 1017 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1018 default boolean getF12Momentary() { 1019 return getFunctionMomentary(12); 1020 } 1021 1022 /** 1023 * Get Momentary Function 13 Status. 1024 * @return true for Momentary Function On, else false. 1025 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1026 */ 1027 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1028 default boolean getF13Momentary() { 1029 return getFunctionMomentary(13); 1030 } 1031 1032 /** 1033 * Get Momentary Function 14 Status. 1034 * @return true for Momentary Function On, else false. 1035 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1036 */ 1037 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1038 default boolean getF14Momentary() { 1039 return getFunctionMomentary(14); 1040 } 1041 1042 /** 1043 * Get Momentary Function 15 Status. 1044 * @return true for Momentary Function On, else false. 1045 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1046 */ 1047 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1048 default boolean getF15Momentary() { 1049 return getFunctionMomentary(15); 1050 } 1051 1052 /** 1053 * Get Momentary Function 16 Status. 1054 * @return true for Momentary Function On, else false. 1055 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1056 */ 1057 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1058 default boolean getF16Momentary() { 1059 return getFunctionMomentary(16); 1060 } 1061 1062 /** 1063 * Get Momentary Function 17 Status. 1064 * @return true for Momentary Function On, else false. 1065 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1066 */ 1067 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1068 default boolean getF17Momentary() { 1069 return getFunctionMomentary(17); 1070 } 1071 1072 /** 1073 * Get Momentary Function 18 Status. 1074 * @return true for Momentary Function On, else false. 1075 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1076 */ 1077 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1078 default boolean getF18Momentary() { 1079 return getFunctionMomentary(18); 1080 } 1081 1082 /** 1083 * Get Momentary Function 19 Status. 1084 * @return true for Momentary Function On, else false. 1085 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1086 */ 1087 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1088 default boolean getF19Momentary() { 1089 return getFunctionMomentary(19); 1090 } 1091 1092 /** 1093 * Get Momentary Function 20 Status. 1094 * @return true for Momentary Function On, else false. 1095 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1096 */ 1097 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1098 default boolean getF20Momentary() { 1099 return getFunctionMomentary(20); 1100 } 1101 1102 /** 1103 * Get Momentary Function 21 Status. 1104 * @return true for Momentary Function On, else false. 1105 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1106 */ 1107 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1108 default boolean getF21Momentary() { 1109 return getFunctionMomentary(21); 1110 } 1111 1112 /** 1113 * Get Momentary Function 22 Status. 1114 * @return true for Momentary Function On, else false. 1115 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1116 */ 1117 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1118 default boolean getF22Momentary() { 1119 return getFunctionMomentary(22); 1120 } 1121 1122 /** 1123 * Get Momentary Function 23 Status. 1124 * @return true for Momentary Function On, else false. 1125 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1126 */ 1127 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1128 default boolean getF23Momentary() { 1129 return getFunctionMomentary(23); 1130 } 1131 1132 /** 1133 * Get Momentary Function 24 Status. 1134 * @return true for Momentary Function On, else false. 1135 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1136 */ 1137 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1138 default boolean getF24Momentary() { 1139 return getFunctionMomentary(24); 1140 } 1141 1142 /** 1143 * Get Momentary Function 25 Status. 1144 * @return true for Momentary Function On, else false. 1145 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1146 */ 1147 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1148 default boolean getF25Momentary() { 1149 return getFunctionMomentary(25); 1150 } 1151 1152 /** 1153 * Get Momentary Function 26 Status. 1154 * @return true for Momentary Function On, else false. 1155 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1156 */ 1157 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1158 default boolean getF26Momentary() { 1159 return getFunctionMomentary(26); 1160 } 1161 1162 /** 1163 * Get Momentary Function 27 Status. 1164 * @return true for Momentary Function On, else false. 1165 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1166 */ 1167 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1168 default boolean getF27Momentary() { 1169 return getFunctionMomentary(27); 1170 } 1171 1172 /** 1173 * Get Momentary Function 28 Status. 1174 * @return true for Momentary Function On, else false. 1175 * @deprecated Use {@code getFunctionMomentary(int functionNum) } instead. 1176 */ 1177 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1178 default boolean getF28Momentary() { 1179 return getFunctionMomentary(28); 1180 } 1181 1182 /** 1183 * Set Momentary Function 0 Status. 1184 * @param f0Momentary true for Momentary Function On, else false. 1185 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1186 */ 1187 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1188 default void setF0Momentary(boolean f0Momentary) { 1189 setFunctionMomentary(0,f0Momentary); 1190 } 1191 1192 /** 1193 * Set Momentary Function 1 Status. 1194 * @param f1Momentary true for Momentary Function On, else false. 1195 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1196 */ 1197 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1198 default void setF1Momentary(boolean f1Momentary) { 1199 setFunctionMomentary(1,f1Momentary); 1200 } 1201 1202 /** 1203 * Set Momentary Function 2 Status. 1204 * @param f2Momentary true for Momentary Function On, else false. 1205 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1206 */ 1207 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1208 default void setF2Momentary(boolean f2Momentary) { 1209 setFunctionMomentary(2,f2Momentary); 1210 } 1211 1212 /** 1213 * Set Momentary Function 3 Status. 1214 * @param f3Momentary true for Momentary Function On, else false. 1215 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1216 */ 1217 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1218 default void setF3Momentary(boolean f3Momentary) { 1219 setFunctionMomentary(3,f3Momentary); 1220 } 1221 1222 /** 1223 * Set Momentary Function 4 Status. 1224 * @param f4Momentary true for Momentary Function On, else false. 1225 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1226 */ 1227 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1228 default void setF4Momentary(boolean f4Momentary) { 1229 setFunctionMomentary(4,f4Momentary); 1230 } 1231 1232 /** 1233 * Set Momentary Function 5 Status. 1234 * @param f5Momentary true for Momentary Function On, else false. 1235 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1236 */ 1237 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1238 default void setF5Momentary(boolean f5Momentary) { 1239 setFunctionMomentary(5,f5Momentary); 1240 } 1241 1242 /** 1243 * Set Momentary Function 6 Status. 1244 * @param f6Momentary true for Momentary Function On, else false. 1245 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1246 */ 1247 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1248 default void setF6Momentary(boolean f6Momentary) { 1249 setFunctionMomentary(6,f6Momentary); 1250 } 1251 1252 /** 1253 * Set Momentary Function 7 Status. 1254 * @param f7Momentary true for Momentary Function On, else false. 1255 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1256 */ 1257 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1258 default void setF7Momentary(boolean f7Momentary) { 1259 setFunctionMomentary(7,f7Momentary); 1260 } 1261 1262 /** 1263 * Set Momentary Function 8 Status. 1264 * @param f8Momentary true for Momentary Function On, else false. 1265 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1266 */ 1267 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1268 default void setF8Momentary(boolean f8Momentary) { 1269 setFunctionMomentary(8,f8Momentary); 1270 } 1271 1272 /** 1273 * Set Momentary Function 9 Status. 1274 * @param f9Momentary true for Momentary Function On, else false. 1275 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1276 */ 1277 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1278 default void setF9Momentary(boolean f9Momentary) { 1279 setFunctionMomentary(9,f9Momentary); 1280 } 1281 1282 /** 1283 * Set Momentary Function 10 Status. 1284 * @param f10Momentary true for Momentary Function On, else false. 1285 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1286 */ 1287 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1288 default void setF10Momentary(boolean f10Momentary) { 1289 setFunctionMomentary(10,f10Momentary); 1290 } 1291 1292 /** 1293 * Set Momentary Function 11 Status. 1294 * @param f11Momentary true for Momentary Function On, else false. 1295 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1296 */ 1297 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1298 default void setF11Momentary(boolean f11Momentary) { 1299 setFunctionMomentary(11,f11Momentary); 1300 } 1301 1302 /** 1303 * Set Momentary Function 12 Status. 1304 * @param f12Momentary true for Momentary Function On, else false. 1305 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1306 */ 1307 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1308 default void setF12Momentary(boolean f12Momentary) { 1309 setFunctionMomentary(12,f12Momentary); 1310 } 1311 1312 /** 1313 * Set Momentary Function 13 Status. 1314 * @param f13Momentary true for Momentary Function On, else false. 1315 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1316 */ 1317 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1318 default void setF13Momentary(boolean f13Momentary) { 1319 setFunctionMomentary(13,f13Momentary); 1320 } 1321 1322 /** 1323 * Set Momentary Function 14 Status. 1324 * @param f14Momentary true for Momentary Function On, else false. 1325 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1326 */ 1327 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1328 default void setF14Momentary(boolean f14Momentary) { 1329 setFunctionMomentary(14,f14Momentary); 1330 } 1331 1332 /** 1333 * Set Momentary Function 15 Status. 1334 * @param f15Momentary true for Momentary Function On, else false. 1335 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1336 */ 1337 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1338 default void setF15Momentary(boolean f15Momentary) { 1339 setFunctionMomentary(15,f15Momentary); 1340 } 1341 1342 /** 1343 * Set Momentary Function 16 Status. 1344 * @param f16Momentary true for Momentary Function On, else false. 1345 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1346 */ 1347 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1348 default void setF16Momentary(boolean f16Momentary) { 1349 setFunctionMomentary(16,f16Momentary); 1350 } 1351 1352 /** 1353 * Set Momentary Function 17 Status. 1354 * @param f17Momentary true for Momentary Function On, else false. 1355 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1356 */ 1357 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1358 default void setF17Momentary(boolean f17Momentary) { 1359 setFunctionMomentary(17,f17Momentary); 1360 } 1361 1362 /** 1363 * Set Momentary Function 18 Status. 1364 * @param f18Momentary true for Momentary Function On, else false. 1365 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1366 */ 1367 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1368 default void setF18Momentary(boolean f18Momentary) { 1369 setFunctionMomentary(18,f18Momentary); 1370 } 1371 1372 /** 1373 * Set Momentary Function 19 Status. 1374 * @param f19Momentary true for Momentary Function On, else false. 1375 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1376 */ 1377 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1378 default void setF19Momentary(boolean f19Momentary) { 1379 setFunctionMomentary(19,f19Momentary); 1380 } 1381 1382 /** 1383 * Set Momentary Function 20 Status. 1384 * @param f20Momentary true for Momentary Function On, else false. 1385 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1386 */ 1387 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1388 default void setF20Momentary(boolean f20Momentary) { 1389 setFunctionMomentary(20,f20Momentary); 1390 } 1391 1392 /** 1393 * Set Momentary Function 21 Status. 1394 * @param f21Momentary true for Momentary Function On, else false. 1395 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1396 */ 1397 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1398 default void setF21Momentary(boolean f21Momentary) { 1399 setFunctionMomentary(21,f21Momentary); 1400 } 1401 1402 /** 1403 * Set Momentary Function 22 Status. 1404 * @param f22Momentary true for Momentary Function On, else false. 1405 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1406 */ 1407 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1408 default void setF22Momentary(boolean f22Momentary) { 1409 setFunctionMomentary(22,f22Momentary); 1410 } 1411 1412 /** 1413 * Set Momentary Function 23 Status. 1414 * @param f23Momentary true for Momentary Function On, else false. 1415 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1416 */ 1417 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1418 default void setF23Momentary(boolean f23Momentary) { 1419 setFunctionMomentary(23,f23Momentary); 1420 } 1421 1422 /** 1423 * Set Momentary Function 24 Status. 1424 * @param f24Momentary true for Momentary Function On, else false. 1425 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1426 */ 1427 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1428 default void setF24Momentary(boolean f24Momentary) { 1429 setFunctionMomentary(24,f24Momentary); 1430 } 1431 1432 /** 1433 * Set Momentary Function 25 Status. 1434 * @param f25Momentary true for Momentary Function On, else false. 1435 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1436 */ 1437 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1438 default void setF25Momentary(boolean f25Momentary) { 1439 setFunctionMomentary(25,f25Momentary); 1440 } 1441 1442 /** 1443 * Set Momentary Function 26 Status. 1444 * @param f26Momentary true for Momentary Function On, else false. 1445 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1446 */ 1447 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1448 default void setF26Momentary(boolean f26Momentary) { 1449 setFunctionMomentary(26,f26Momentary); 1450 } 1451 1452 /** 1453 * Set Momentary Function 27 Status. 1454 * @param f27Momentary true for Momentary Function On, else false. 1455 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1456 */ 1457 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1458 default void setF27Momentary(boolean f27Momentary) { 1459 setFunctionMomentary(27,f27Momentary); 1460 } 1461 1462 /** 1463 * Set Momentary Function 28 Status. 1464 * @param f28Momentary true for Momentary Function On, else false. 1465 * @deprecated Use {@code setFunctionMomentary(int functionNum) } instead. 1466 */ 1467 @Deprecated(since="5.1.2", forRemoval=false) // used in scripts 1468 default void setF28Momentary(boolean f28Momentary) { 1469 setFunctionMomentary(28,f28Momentary); 1470 } 1471 1472 /** 1473 * Locomotive address. The exact format is defined by the specific 1474 * implementation, as subclasses of LocoAddress will contain different 1475 * information. 1476 * <p> 1477 * This is an unbound property. 1478 * 1479 * @return The locomotive address 1480 */ 1481 LocoAddress getLocoAddress(); 1482 1483 /** 1484 * Not for general use, see {@link #release(ThrottleListener l)} and 1485 * {@link #dispatch(ThrottleListener l)}. 1486 * <p> 1487 * Dispose of object when finished it. This does not free any hardware 1488 * resources used; rather, it just cleans up the software implementation. 1489 * <p> 1490 * Used for handling certain internal error conditions, where the object 1491 * still exists but hardware is not associated with it. 1492 * <p> 1493 * After this, further usage of this Throttle object will result in a 1494 * JmriException. 1495 * 1496 * @param l {@link ThrottleListener} to dispose of 1497 */ 1498 void dispose(ThrottleListener l); 1499 1500 /** 1501 * Finished with this Throttle, tell the layout that the locomotive is 1502 * available for reuse/reallocation by somebody else. 1503 * <p> 1504 * After this, further usage of this Throttle object will result in a 1505 * JmriException. Do not call dispose after release. 1506 * <p> 1507 * Normally, release ends with a call to dispose. 1508 * 1509 * @param l {@link ThrottleListener} to release. May be null if no 1510 * {@link ThrottleListener} is currently held. 1511 */ 1512 void release(ThrottleListener l); 1513 1514 /** 1515 * Finished with this Throttle, tell the layout that the locomotive is 1516 * available for reuse/reallocation by somebody else. If possible, tell the 1517 * layout that this locomotive has been dispatched to another user. Not all 1518 * layouts will implement this, in which case it is synonymous with 1519 * {@link #release(jmri.ThrottleListener)}. 1520 * <p> 1521 * After this, further usage of this Throttle object will result in a 1522 * JmriException. 1523 * <p> 1524 * Normally, dispatch ends with a call to dispose. 1525 * 1526 * @param l {@link ThrottleListener} to dispatch 1527 */ 1528 void dispatch(ThrottleListener l); 1529 1530 void setRosterEntry(BasicRosterEntry re); 1531 1532 BasicRosterEntry getRosterEntry(); 1533 1534 /** 1535 * Notify listeners that a Throttle has Release enabled or disabled. 1536 * <p> 1537 * For systems where release availability is variable. 1538 * 1539 * @param newVal true if Release enabled, else false 1540 */ 1541 void notifyThrottleReleaseEnabled(boolean newVal); 1542 1543 /** 1544 * Notify listeners that a Throttle has Dispatch enabled or disabled. 1545 * <p> 1546 * For systems where dispatch availability is variable. 1547 * 1548 * @param newVal true if Dispatch enabled, else false 1549 */ 1550 void notifyThrottleDispatchEnabled(boolean newVal); 1551}