4.6. IPresenterCommandBuilder
added in version 1.13.0
An interface to provide functions to generate commands for the presenter control.
Method
Name
Contents
Set command of presenter operation is generated and added to the command buffer.
Initialization command of the presenter paper counter is generated and added to the command buffer.
Gets the command buffer (generated command).
This interface is only for models with presenter. This table shows the supported methods for each model.
Model/Emulation |
TUP500 | SK1-211/221/V211 Presenter | SK1-311/V311 Presenter |
---|---|---|---|
StarLine | StarPRNT | StarPRNT | |
appendOperation |
✔ | ✔ | ✔ |
appendClearPaperCounter |
✔ | ✔ | ✔ |
getCommands |
✔ | ✔ | ✔ |
4.6.1. appendOperation
added in version 1.13.0
Set command of presenter operation is generated and added to the command buffer.
Declaration
void appendOperation(PresenterSetting setting);
Parameter
Name
Contents
Type
setting
Setting information for presenter operation
The parameters which can be set in the setting argument are the following.
Method
Contents
Parameters that can be set
Default (operation when nothing is specified)
setMode
Presenter operation mode
Mode.LoopHoldMode.NoLoopHoldMode.NoLoopNoHoldMode.NoLoopNoHold
setPaperRetractFunction
Paper retract function
PaperRetractFunction.RetractPaperRetractFunction.EjectPaperRetractFunction.DisablePaperRetractFunction.Disable
setPaperHoldTime
Paper hold time(Units : mSec)1 – 127500
127500
Return value
None
Exception
Class
Contents
IllegalArgumentException
One of the following1. Parameter is out of range2. When “Mode.NoLoopNoHold” is specified with the setMode method and other than PaperRetractFunction.Disable is specified with the setPaperRetractFunction method.Examples
public static byte[] createSetPresenterOperation(Emulation emulation, Mode mode, PaperRetractFunction retractFunction, int holdTime) { IPresenterCommandBuilder builder = StarIoExt.createPresenterCommandBuilder(emulation); PresenterSetting setting = new PresenterSetting(); setting.setMode(mode); setting.setPaperRetractFunction(retractFunction); if (retractFunction == PaperRetractFunction.Retract || retractFunction == PaperRetractFunction.Eject) { setting.setPaperHoldTime(holdTime); } builder.appendOperation(setting); return builder.getCommands(); }
Refer to PresenterFunctions.java.
4.6.2. appendClearPaperCounter
added in version 1.13.0
Initialization command of the presenter paper counter is generated and added to the command buffer.
Declaration
void appendClearPaperCounter();
Parameter
None
Return value
None
Examples
public static byte[] createClearCounter(Emulation emulation) { IPresenterCommandBuilder builder = StarIoExt.createPresenterCommandBuilder(emulation); builder.appendClearPaperCounter(); return builder.getCommands(); }
Refer to PresenterFunctions.java.
4.6.3. getCommands
added in version 1.13.0
Gets the command buffer (generated command).
Declaration
byte[] getCommands();
Parameter
None
Return value
Contents
Type
Command buffer (generated command)
byte[]