Mobile Phone Voting System Messages

(Note: The messages below are for SIS version 3. For SIS version 5 please replace Message ID by Message Type. For example <MsgID>21</MsgID> should be replaced by <Item><Key>MessageType</Key><Value>21</Value></Item>.
Moreover, a Message ID must be a positive nonzero integer. A Message Type can be any alphanumerical string. There are other minor differences. Please read the ReadMe for SIS Version 5.)

MsgID:21 Description: Create ABB VotingSoftware Component Example:CreateVS.XML
Variables:
  • Passcode: ****
  • SecurityLevel: 3
  • Name: VotingSoftware (Name of created Component)
  • SourceCode: VS.jar (Source code file name of created Component)
  • InputMsgID 1: 701 (CastVote with attributes VoterPhoneNo, CandidateID)
  • InputMsgID 2: 702 (RequestReport with attributes Passcode,N)
  • InputMsgID 3: 703 (Initialize TallyTable with attributes Passcode,CandidateList)
  • OutputMsgID 1: 711 (AcknowledgeVote with attribute Status)
  • OutputMsgID 2: 712 (AcknowledgeRequestReport with attribute RankedReport)
  • OutputMsgID 3: 26 (Acknowledgement with attributes AckMsgID,YesNo,Name)
  • Component Description: VotingSoftware checks voters using VoterTable and counts votes into TallyTable. Each voter is supposed to have a unique VoterPhoneNo.

    When message 701 is received, the VoterPhoneNo is checked against the VoterTable. If it is already there, the voter is prevented from voting, and message 711 is sent with Status 1 (duplicate vote). If it is not there, the VoterPhoneNo is added to VoterTable, and the CandidateID is checked against TallyTable. If CandidateID is not there, Message 711 is sent with Status 2 (invalid vote). If CandidateID is there, that entry is incremented and Message 711 is sent with Status 2 (valid vote).

    When message 702 is received and Passcode is verified, a RankedReport containing the first N CandidateID's with highest rankings is generated, and a message 712 is sent containing this RankedReport as a long string. If passcode is wrong, this RankedReport is null. At the end both VoterTable and TallyTable are destroyed.

    When message 703 is received and Passcode is verified, TallyTable is initialized by loading it with CandidateList. A general acknowledge message 26 is sent.
  • KnowledgeBase: VoterTable,TallyTable
MsgID:22 Description: Kill Component Example:Msg22.XML
Variables:
  • Passcode (Passcode of Administrator)
  • SecurityLevel (Security Level of Administrator)
  • Name (Name of killed Component)
  • SourceCode (Source code file name of killed Component)
MsgID:23 Description: Connect to server Example:Msg23.XML
Variables:
  • Passcode (Passcode of Administrator)
  • SecurityLevel (Security Level of Administrator)
  • Name (Name of Component to be connected to server)
MsgID:24 Description: Activate Component Example:Msg24.XML
Variables:
  • Passcode (Passcode of Administrator)
  • SecurityLevel (Security Level of Administrator)
  • Name (Name of activated Component)
  • SourceCode (Source code file name of activated Component)
MsgID:25 Description: DeActivate Component Example:Msg25.XML
Variables:
  • Passcode (Passcode of Administrator)
  • SecurityLevel (Security Level of Administrator)
  • Name (Name of deactivated Component)
  • SourceCode (Source code file name of activated Component)
MsgID:26 Description: Acknowledgement Example:Msg26.XML
Variables:
  • AckMsgID (This is Ack for MsgID)
  • YesNo (Yes/No for positive/negative Ack)
  • Name (Name of involved Component)
MsgID:701 Description: Cast Vote Example:Msg701.XML
Variables:
  • VoterPhoneNo
  • CandidateID
MsgID:702 Description: Request Report Example:Msg702.XML
Variables:
  • Passcode
  • N (number of winners)
MsgID:703 Description: Initialize Tally Table Example:Msg703.XML
Variables:
  • Passcode
  • CandidateList (a string of CandidateID separated by semicolons)
MsgID:711 Description: Acknowledge Vote Example:Msg711.XML
Variables:
  • Status (1: duplicate, 2: invalid, 3: valid)
MsgID:712 Description: Acknowledge RequestReport Example:Msg712.XML
Variables:
  • RankedReport (a string of N CandidateID,NumberVote separated by semicolons)

A sample script

The GUI, which is an expended and customized version of the Universal Interface PrjRemote, should accept a sample script as follows (The script is a list of XML file names. Your GUI will read the file name and process the message one by one. There is no parsing involved. My example is to explain what each message is for. In the actual script, you will just see the file names):

Message 21 create voting component:CreateVS.XML
Message 703 initialize tally table:Msg703.XML
Message 701 cast vote:Msg701.XML
Message 701 cast duplicate vote:Msg701.XML
Message 701 cast another vote:Msg701a.XML
Message 702 request report:Msg702.XML

Messages 26, 701 and 702 will be generated as a result, and should be displayed meaningfully by the GUI.