PTBurn
SDK
Page
42
of
68
©
2011
Primera
Technology,
Inc.
Primera
is
a
registered
trademark
and
Bravo
is
a
trademark
of
Primera
Technology,
Inc.
All
other
trademarks
are
the
property
of
their
respective
companies.
Value=X
ClientID=Administrator
RobotName=zzzz
where
the
value
of
X
will
either
Set
or
Clear
Kiosk
Mode.
1
=
Set
Kiosk
Mode
0
=
Clear
Kiosk
Mode
ClientID
should
be
set
to
Administrator
RobotName
zzzz
specifies
which
printer/robot
to
set/clear
(e.g.
Disc
Publisher
SE).
If
RobotName
is
not
specified
it
will
set/clear
kiosk
mode
for
the
first
robot
found.
4.16
Clean
Cartridges
This
command
is
used
to
clean/purge
the
cartridges.
Message
=
CLEAN_CARTRIDGES
5
Coding
Best
Practices
5.1 Programming Tips
5.1.1
Reading
the
Status
File
The
status
file
should
NOT
be
opened
in
a
locked
state.
To
ensure
this
you
should
either
open
the
file
with
FileShare
set
to
FileShare.ReadWrite
or
use
GetPrivateProfileString
(and/or
GetPrivateProfileInt).
C#
example:
FileStream
fs
=
File.Open(“C:\PTBurnJobs\Status\Disc
Publisher
Pro
Xi.txt”,
FileMode.Open,
FileAccess.Read,
FileShare.ReadWrite);
5.1.2
Determining
if
the
service
is
Running.
To
determine
if
the
service
is
running
you
can
use
the
ServiceController
class
in
.NET.
Otherwise
if
you
read
the
status
file
and
the
ServerTime
and
ServerTickCount
are
NOT
incrementing
then
you
know
the
service
is
NOT
running.
5.1.3
Starting
the
service
We
advise
that
when
you
application
starts
it
should
ensure
the
service
is
running
and
if
not
your
application
should
start
the
service.
This
can
be
done
easily
with
.NET
using
the
ServiceController
class.