Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

[ocf] Improve the information for resource and platform #808

Closed
@cuiyanx

Description

@cuiyanx

Description

I test OCF module and I find the information of resource and platform is very good, but not perfect. Please complete it.

Test Code

Server code:

var resourceInit = {
    resourcePath: "/test/OCFserver",
    resourceTypes: ["core.test"],
    interfaces: ["/oic/if/rw"],
    discoverable: true,
    observable: true,
    properties: TestProperties
}

ocf.platform = {
    manufacturerName: "TestManufacturer",
    osVersion: "16.04",
    model: "Arduino101",
    manufacturerURL: "testurl.com",
    manufacturerDate: "11-11-2011",
    platformVersion: "5.0",
    firmwareVersion: "9.0",
    supportURL: "testurl.com/support"
}

Client code:

console.log("on('platformfound'):");
console.log("    id: " + platform.id);
console.log("    Manufacturer Name: " + platform.manufacturerName);
console.log("    osVersion: " + platform.osVersion);
console.log("    model " + platform.model);
console.log("    manufacturerURL: " + platform.manufacturerURL);
console.log("    manufacturerDate: " + platform.manufacturerDate);
console.log("    platformVersion: " + platform.platformVersion);
console.log("    firmwareVersion: " + platform.firmwareVersion);
console.log("    supportURL: " + platform.supportURL);

console.log("on('retrieve'):");
console.log("    deviceId: " + resource.deviceId);
console.log("    resourcePath: " + resource.resourcePath);
console.log("    resourceTypes: " + resource.resourceTypes);
console.log("    interfaces: " + resource.interfaces);
console.log("    properties: " + resource.properties);

Steps to Reproduction

  1. Build OCFserver to a101.
  2. Connect to a101 by BLE.
  3. Build OCFclient with linux.

Actual Result

selection_001
selection_002

Expected Result

No undefined object.

Test Builds

Branch Commit Id Target Device Test Date Result
master 6b7abbd Arduino 101 March 10, 2017 Fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions