1 package at.ac.tuwien.sbc.valesriegler.xvsm.cook;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
6 import at.ac.tuwien.sbc.valesriegler.xvsm.AbstractXVSMConnector;
7 import at.ac.tuwien.sbc.valesriegler.xvsm.XVSMConnector;
10 private static final String USAGE = "Cook needs exactly one parameter: ID of type Integer";
11 private static final Logger log = LoggerFactory.getLogger(Cook.class);
14 private AbstractXVSMConnector xvsm;
16 public static void main(String[] args) {
17 if(args.length != 1) {
18 throw new IllegalArgumentException(USAGE);
23 parsedId = Integer.parseInt(args[0]);
24 } catch (NumberFormatException e) {
29 Cook cook = new Cook(parsedId);
33 private void start() {
34 initSpaceCommunication();
40 private void initSpaceCommunication() {
41 xvsm = new XVSMConnector();
42 xvsm.initSpaceCommunication();
44 log.info("Space Connection established!");
51 log.info("I AM A Cook WITH ID {}", id);