Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Command Line Arguments

Bambi supports several command line arguments in order to automate the application start. The following a list of all arguments plus a short description about their usage:

ArgumentsDescriptionDefault Value
ShortLong
-a
--auto

Auto start
Bambi server will be started automatically.

false
-c
--context
URL Context
Subpath of URL
"bambi"
-p
--port
Port
Port on which bambi server is listening.
8080

Sample

Here a sample how to use the command line arguments. This leads to an automated server start. The URL of the started bambi server is http://localhost:9999/myContext

Command Line Argument Sample
C:\>bambi.exe -a -c myContext -p 9999

 

Device Configuration Files

Device Configuration files define the respective devices that Bambi simulates. The configuration file can be found at <base dir>/config/devices.xml One Bambi simulator can represent multiple devices. Each device is represented by one Device element in the configuration file. The following table defines some of the valid device parameters:

Configuration ParameterCardinalityDescription
/application/@BaseDirrequireddirectory where all Bambi Files are stored.
/application/@ContextrequiredUrl base Path of the application
/application/@PortrequiredUrl Port of the application
//Device/@DeviceIDrequiredJDF DeviceID of the simulated device
//Device/@TrackResourceoptionalresource that is tracked with Resource Audits and Resource JMF and that defines the speed for counting status JMFs.
//Device/@AmountResourcesoptionaladditional resources that are tracked with Resource Audits and Resource JMF.
//Device/@TypeExpressionoptionalregular expression of types that are accepted by the simulator
Device Configuration
<?xml version="1.0" encoding="UTF-8"?>
<application  AppDir="C:\Users\s.meissner\AppData\Local\Temp\jetty-0.0.0.0-8080-bambi.tmp.war-_context-any-\webapp"  
    BaseDir="/bambidata/sim/"  CallBackName="org.cip4.bambi.extensions.ExtensionCallback"  
    Context="/SimWorker" JDFDir="JDFDir" JettyPort="44482" Port="8080" SenderID="SimDevice">
    <Device DeviceID="SimWorkerRoot" DeviceType="Bambi Sim Device Root"/>
    <Device AcceptAll="true" DeviceID="sim001"  DeviceType="Bambi Simulation HotFolder Device 001"  
        ErrorHF="/BambiHF/sim001/Error" InputHF="/BambiHF/sim001/Input"  OutputHF="/BambiHF/sim001/Output"  
        ProxyURL="http://localhost:8080/BambiProxy/slavejmf/pullproxy" TrackResource="Component:Output"/>
    <Device DeviceID="sim002"  DeviceType="Bambi Simulation HotFolder Device 002"  
        ErrorHF="/BambiHF/sim002/Error" InputHF="/BambiHF/sim002/Input"  OutputHF="/BambiHF/sim002/Output" 
        TrackResource="Component:Output"/>
    <Device DeviceID="sim003"  DeviceType="Bambi Push Simulation Device 003"  
        ErrorHF="/BambiHF/sim003/Error" InputHF="/BambiHF/sim003/Input"  MIMEExpansion="true" 
        OutputHF="/BambiHF/sim003/Output"  PushPull="Push" TrackResource="Component:Output"/>
    <Device AmountResources="Media:Input,UsageCounter" DeviceID="simIDP"  
        DeviceType="Bambi Push Simulation IDP Device"  ErrorHF="/BambiHF/simIDP/Error" 
        InputHF="/BambiHF/simIDP/Input"  MIMEExpansion="true" OutputHF="/BambiHF/simIDP/Output"  
        PushPull="Push" TrackResource="Component:Output" TypeExpression="(.)*DigitalPrinting(.)*"/>
</application> 
Employee Configuration
<?xml version="1.0" encoding="UTF-8"?>
<Employees xmlns="http://www.CIP4.org/JDFSchema_1_1">
    <Employee ProductID="E1" Roles="Operator" >
        <Person DescriptiveName="Joe Cool" />
    </Employee>
    <Employee ProductID="E2" Roles="Operator" >
        <Person DescriptiveName="Harry II" />
    </Employee>
    <Employee ProductID="E3" Roles="Operator" >
        <Person DescriptiveName="John Doe" />
    </Employee>
    <Employee ProductID="E4" Roles="Operator" >
        <Person DescriptiveName="Fool Hardy" />
    </Employee>
</Employees>

Job Simulation Configuration Files

Job Simulation Configuration files define the respective phases of a job that Bambi simulates. The default job configuration file can be found at <base dir>/config/job.xml. Device specific configuration file can be found at <base dir>/config/job_<deviceid>.xml. Each JobPhase is iterated over individually.

Configuration ParameterCardinalityDescription
/BambiJob/@Erroroptional% chance per iteration that a random error will be inserted
//JobPhase/@Durationrequiredmaximum duration of the job phase in seconds.
//JobPhase/@<xxx>Statusrequireddevice and node status and stausdetails for audits and JMF that apply to this phase
//Amount/@ResourcerequiredThe resource that this amount applies to.
//Amount/@SpeedoptionalSpeed of consumption or production in implied JDF units/hour.

 

 

Device Configuration
<?xml version="1.0" encoding="UTF-8"?>
<BambiJob Error="3">
    <JobPhase Duration="2" DeviceStatus="Setup" DeviceStatusDetails="WarmingUp" 
        NodeStatus="Setup" NodeStatusDetails="node warmup">
        <Amount Resource="Component:Output" Speed="0" />
        <Amount Resource="Media:Input" Speed="0" />
    </JobPhase>
    <JobPhase Duration="10" DeviceStatus="Setup" DeviceStatusDetails="Waste" 
        NodeStatus="Setup" NodeStatusDetails="node setup">
        <Amount Resource="Component:Output" Speed="4000" Waste="true"/>
        <Amount Resource="Media:Input" Speed="4000" Waste="true" />
    </JobPhase>
    <JobPhase Duration="99999" DeviceStatus="Running" DeviceStatusDetails="Good" 
        NodeStatus="InProgress" NodeStatusDetails="producing node">
        <Amount Resource="Component:Output" Speed="16000" />
        <Amount Resource="Media:Input" Speed="16000" />
    </JobPhase>
    <JobPhase Duration="10" DeviceStatus="Cleanup" DeviceStatusDetails="WashUp" 
        NodeStatus="Cleanup" NodeStatusDetails="cleaning up">
        <Amount Resource="Component:Output" Speed="0" />
        <Amount Resource="Media:Input" Speed="0" />
    </JobPhase>
</BambiJob> 

 

Configure format Date fields

Date fields can be configured to show its value in most appropriate way. Currently, it shows in Europian way, thus "DD/MM/YYYY".

To change behaviour, user need to update "/CIP4Tools/bambi/legacy/queue2html.xsl" file. In the file, near bottom of it, you will find next line:

<xsl:variable name="dateFormatter" select="'EURODate'"/>

Please, read comment in the file, about usage of the formatter and supported formats.

  • No labels