2 *******************************************************************
4 * Copyright 2015 Intel Corporation.
6 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
23 package org.iotivity.base;
26 * This class describes the platform properties. All non-Null properties will be
27 * included in a platform discovery request.
29 public class OcPlatformInfo {
30 private String mPlatformId;
31 private String mManufacturerName;
32 private String mManufacturerUrl;
33 private String mModelNumber;
34 private String mDateOfManufacture;
35 private String mPlatformVersion;
36 private String mOperatingSystemVersion;
37 private String mHardwareVersion;
38 private String mFirmwareVersion;
39 private String mSupportUrl;
40 private String mSystemTime;
43 * construct OcPlatformInfo with mandatory fields which cannot be null
44 * manufacturerName cannot be > 16 chars
45 * manufacturerUrl cannot be > 32 chars
47 public OcPlatformInfo(String platformId, String manufacturerName,
48 String manufacturerUrl) {
49 this.mPlatformId = platformId;
50 this.mManufacturerName = manufacturerName;
51 this.mManufacturerUrl = manufacturerUrl;
54 public OcPlatformInfo(String platformId,
55 String manufacturerName,
56 String manufacturerUrl,
58 String dateOfManufacture,
59 String platformVersion,
60 String operatingSystemVersion,
61 String hardwareVersion,
62 String firmwareVersion,
65 this(platformId, manufacturerName, manufacturerUrl);
66 this.mModelNumber = modelNumber;
67 this.mDateOfManufacture = dateOfManufacture;
68 this.mPlatformVersion = platformVersion;
69 this.mOperatingSystemVersion = operatingSystemVersion;
70 this.mHardwareVersion = hardwareVersion;
71 this.mFirmwareVersion = firmwareVersion;
72 this.mSupportUrl = supportUrl;
73 this.mSystemTime = systemTime;
76 public String getPlatformId() {
80 public void setPlatformId(String platformId) {
81 this.mPlatformId = platformId;
84 public String getManufacturerName() {
85 return mManufacturerName;
88 public void setManufacturerName(String manufacturerName) {
89 this.mManufacturerName = manufacturerName;
92 public String getManufacturerUrl() {
93 return mManufacturerUrl;
96 public void setManufacturerUrl(String manufacturerUrl) {
97 this.mManufacturerUrl = manufacturerUrl;
100 public String getModelNumber() {
104 public void setModelNumber(String modelNumber) {
105 this.mModelNumber = modelNumber;
108 public String getDateOfManufacture() {
109 return mDateOfManufacture;
112 public void setDateOfManufacture(String dateOfManufacture) {
113 this.mDateOfManufacture = dateOfManufacture;
116 public String getPlatformVersion() {
117 return mPlatformVersion;
120 public void setPlatformVersion(String platformVersion) {
121 this.mPlatformVersion = platformVersion;
124 public String getOperatingSystemVersion() {
125 return mOperatingSystemVersion;
128 public void setOperatingSystemVersion(String operatingSystemVersion) {
129 this.mOperatingSystemVersion = operatingSystemVersion;
132 public String getHardwareVersion() {
133 return mHardwareVersion;
136 public void setHardwareVersion(String hardwareVersion) {
137 this.mHardwareVersion = hardwareVersion;
140 public String getFirmwareVersion() {
141 return mFirmwareVersion;
144 public void setFirmwareVersion(String firmwareVersion) {
145 this.mFirmwareVersion = firmwareVersion;
148 public String getSupportUrl() {
152 public void setSupportUrl(String supportUrl) {
153 this.mSupportUrl = supportUrl;
156 public String getSystemTime() {
160 public void setSystemTime(String systemTime) {
161 this.mSystemTime = systemTime;