+ Character.toUpperCase(platform.charAt(0))
+ platform.substring(1).toLowerCase() + "Node";
}
public static void main(String[] args) throws IOException {
ArgumentManager config = new ArgumentManager();
config.handleArguments(args);
String nodeType = config.getProperty("nodeType");
String platform = nodeType;
GenericNode node;
if (nodeType != null) {
node = createNode(nodeType);
} else {
platform = config.getProperty("platform");
if (platform == null) {
// Default platform
platform = "sky";
// Guess platform based on firmware filename suffix.
// TinyOS firmware files are often named 'main.exe'.
String[] a = config.getArguments();
if (a.length > 0 && !"main.exe".equals(a[0])) {
int index = a[0].lastIndexOf('.');
if (index > 0) {
platform = a[0].substring(index + 1);
}