本文整理匯總了Java中iotsuite.semanticmodel.Device類的典型用法代碼示例。如果您正苦於以下問題:Java Device類的具體用法?Java Device怎麽用?Java Device使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Device類屬於iotsuite.semanticmodel包,在下文中一共展示了Device類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getInstance
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static Object getInstance(String middlewareName, Device device,
Object context) {
if (middlewareName.equals("mqtt")) {
if (singletonInstance == null) {
singletonInstance = new PubSubMiddleware(device.getType(),
device.getName(), context);
}
return singletonInstance;
}
return null;
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:15,代碼來源:IoTSuiteFactory.java
示例2: getInstance
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static PubSubMiddleware getInstance(Device device, Object context) {
if (singletonInstance == null) {
singletonInstance = new PubSubMiddleware(device.getType(),
device.getName(), context);
}
return singletonInstance;
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:9,代碼來源:PubSubMiddleware.java
示例3: notifyReceived
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
@Override
public void notifyReceived(String eventName, Object arg, Device deviceInfo) {
try {
if (eventName.equals("profileResponse")) {
Logger.log(myDeviceInfo.getName(), "EndUserInteraction",
"Notification Received Profile");
onNewprofileResponse((TempStruct) arg);
}
} catch (Exception e) {
e.printStackTrace();
}
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:15,代碼來源:EndUserInteraction.java
示例4: getInstance
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static Object getInstance(String middlewareName, Device device,
Object context) {
if (middlewareName.equals("mqtt")) {
if (singletonInstance == null) {
singletonInstance = new PubSubMiddleware(device.getType(),
device.getName(), (Context) context);
}
return singletonInstance;
}
return null;
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:15,代碼來源:IoTSuiteFactory.java
示例5: getInstance
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static PubSubMiddleware getInstance(Device device, Activity context) {
if (singletonInstance == null) {
singletonInstance = new PubSubMiddleware(device.getType(),
device.getName(), context);
}
return singletonInstance;
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:9,代碼來源:PubSubMiddleware.java
示例6: notifyReceived
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
@Override
public void notifyReceived(String eventName, Object arg, Device deviceInfo) {
try {
if (eventName.equals("profile")) {
Logger.log(myDeviceInfo.getName(), "EndUserInteraction",
"Notification Received Profile");
onNewprofileResponse((TempStruct) arg);
}
} catch (Exception e) {
e.printStackTrace();
}
}
開發者ID:chauhansaurabhb,項目名稱:EndUserInteractioion_RequestResponse_Command,代碼行數:15,代碼來源:EndUserInteraction.java
示例7: generateAndroidManifest
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public CompilationUnit generateAndroidManifest(Device device) {
StringTemplate templateOfGUIDriver = group
.getInstanceOf("Android/deviceManifestAndroid");
templateOfGUIDriver.setAttribute("device", device);
templateOfGUIDriver.registerRenderer(String.class,
new MyAttributeRenderer());
return new CompilationUnit("AndroidManifest.xml", templateOfGUIDriver,
"AndroidManifest", "manifest", device);
}
示例8: generateDeviceStartup
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public CompilationUnit generateDeviceStartup(Device device) {
StringTemplate templateOfDevice = group.getInstanceOf("Common/device");
templateOfDevice.setAttribute("device", device);
templateOfDevice.registerRenderer(String.class,
new MyAttributeRenderer());
return new CompilationUnit("Startup" + ".java", templateOfDevice,
"device", device.getName(), device);
}
示例9: getInstance
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static Object getInstance(String middlewareName, Device device,
Object context) {
if (middlewareName.equals("mqtt")) {
if (singletonInstance == null) {
singletonInstance = new PubSubMiddleware();
}
return singletonInstance;
}
return null;
}
示例10: mappingFileGenerator
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
public static void mappingFileGenerator(List<Device> deviceList,
List<DeploymentScope> mappingConstraintList) throws IOException {
// Mapping Algorithm
Map<Device, Set<String>> taskMapper = MappingAlgoCompiler.mapTasks(
deviceList, mappingConstraintList);
// System.out.println("DeviceList..."+deviceList+
// "taskMapper.."+taskMapper+
// " Deployment Scope...."+mappingConstraintList);
for (Entry<Device, Set<String>> entry : taskMapper.entrySet()) {
Device device = MergeDeviceAbilities(entry.getKey(),
entry.getValue(), "DBServer");
if (device.getType().equals("NodeJS")) {
multiplyTemplate(device);
genearateProjectFileCode(device);
} else {
multiplyTemplate(device);
genearateStartupCode(device);
genearateExecutionCode(device);
genearateProjectFileCode(device);
}
}
}
示例11: MergeDeviceAbilities
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
private static Device MergeDeviceAbilities(Device device,
Set<String> swComponentName, String filterAbility) {
List<String> forLoopAbilities = new ArrayList<String>();
forLoopAbilities.addAll(device.getAbilities());
forLoopAbilities.addAll(swComponentName);
Set<String> resultAbilities = new HashSet<String>();
for (String ab : forLoopAbilities) {
if (ab.equals(filterAbility)) {
// Do nothing...
} else {
resultAbilities.add(ab);
resultAbilities.addAll(swComponentName);
}
}
/*
* return new Device(device.getName(), device.getType(),
* device.getNetworkAddress(), device.getRegion(),
* device.getRegionLabels(), resultAbilities, device.getMobileFlag(),
* device.getProtocol(), device.getDescription(), device.getDatabase());
*/
return new Device(device.getName(), device.getType(), resultAbilities,
device.getProtocol(), device.getDescription(),
device.getDatabase());
}
示例12: genearateStartupCode
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
private static void genearateStartupCode(Device device) {
JavaFrameworkFromST generateDevice = new JavaFrameworkFromST();
CompilationUnit generatedCU = generateDevice
.generateDeviceStartup(device);
SourceFileDumper dumpGeneratedDevice = new SourceFileDumper();
dumpGeneratedDevice.dumpCompilationUnit(generatedCU);
}
示例13: genearateExecutionCode
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
private static void genearateExecutionCode(Device device) {
JavaFrameworkFromST generateDevice = new JavaFrameworkFromST();
CompilationUnit generatedCU = generateDevice
.generatePlatformSpecificExecutionStartup(device);
SourceFileDumper dumpGeneratedDevice = new SourceFileDumper();
dumpGeneratedDevice.dumpCompilationUnit(generatedCU);
}
示例14: genearateProjectFileCode
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
private static void genearateProjectFileCode(Device device) {
JavaFrameworkFromST generateDevice = new JavaFrameworkFromST();
CompilationUnit generatedCU = generateDevice
.generatePlatformSpecificProjectFile(device);
SourceFileDumper dumpGeneratedDevice = new SourceFileDumper();
dumpGeneratedDevice.dumpCompilationUnit(generatedCU);
}
示例15: generateDeviceManifest
import iotsuite.semanticmodel.Device; //導入依賴的package包/類
private static void generateDeviceManifest(Device device) {
JavaFrameworkFromST generatedGUIDriver = new JavaFrameworkFromST();
CompilationUnit generatedCU = generatedGUIDriver
.generateAndroidManifest(device);
SourceFileDumper dumpGeneratedGUIDriver = new SourceFileDumper();
dumpGeneratedGUIDriver.dumpCompilationUnit(generatedCU);
}