3 import diku
.distlab
.motecontrolclientlib
.protocols
.*;
5 public class ConfirmText
{
10 public ConfirmText(long mote_id
, short type
, int result
) {
11 this.mote_id
= mote_id
;
12 if (result
!= MsgResult
.SUCCESS
) {
14 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_GETHANDLE
:
15 message
= "Control request failed.";
17 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_DROPHANDLE
:
18 message
= "Release failed.";
20 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_REPROGRAM
:
21 message
= "Programming failed.";
23 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_STATUS
:
24 message
= "Status request failed.";
26 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_RESET
:
27 message
= "Reset failed.";
29 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_STOP
:
30 message
= "Stop failed.";
32 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_START
:
33 message
= "Start failed.";
38 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_GETHANDLE
:
39 message
= "Control request successful.";
41 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_DROPHANDLE
:
42 message
= "Release successful.";
44 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_REPROGRAM
:
45 message
= "Programming successful.";
47 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_STATUS
:
48 message
= "Status request successful.";
50 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_RESET
:
51 message
= "Reset successful.";
53 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_STOP
:
54 message
= "Stop successful.";
56 case diku
.distlab
.motecontrolclientlib
.protocols
.simplemotecontrol
.MOTE_START
:
57 message
= "Start successful.";
63 public String
getMessage() {
67 public void setMessage(String message
) {
68 this.message
= message
;
71 public long getMote_id() {
75 public void setMote_id(long mote_id
) {
76 this.mote_id
= mote_id
;