OpenECHO
Main Page
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Users
0000124930
Documents
Dropbox
Projects
1404_OpenECHOforProcessing2
Deliver
OpenECHO
src
com
sonycsl
echo
processing
defaults
DefaultNodeProfile.java
Go to the documentation of this file.
1
package
com.sonycsl.echo.processing.defaults;
2
3
import
java.io.IOException;
4
5
import
com.sonycsl.echo.eoj.profile.NodeProfile
;
6
7
public
class
DefaultNodeProfile
extends
NodeProfile
{
8
9
byte[] mManufactureCode = {0,0,0};
10
byte[] mStatus = {0x30};
11
byte[] mIdNumber = {(byte)0xFE,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
12
byte[] mUniqueId = {0,1};
13
14
public
DefaultNodeProfile
() {
15
super();
16
// TODO Auto-generated constructor stub
17
}
18
19
@Override
20
protected
byte[]
getManufacturerCode
() {
return
mManufactureCode;}
21
22
@Override
23
protected
byte[]
getOperatingStatus
() {
return
mStatus; }
24
25
public
void
changeOperatingStatus
(
boolean
status) {
26
byte b = (status?(byte)0x30:(byte)0x31) ;
27
28
if
(mStatus[0] == b) return ;
29
mStatus[0] = b;
30
try
{
31
inform
().reqInformOperatingStatus().send();
32
}
catch
(IOException e) {e.printStackTrace();}
33
}
34
35
@Override
36
protected
byte[]
getIdentificationNumber
() {
return
mIdNumber;}
37
38
@Override
39
protected
boolean
setUniqueIdentifierData
(byte[] edt) {
40
if
((edt[0] & 0x40) != 0)
41
return
false
;
42
43
mUniqueId[0] = (byte)(((edt[0] & (byte)0x3F) | (mUniqueId[0] & 0x80)) | (byte)0x40);
44
mUniqueId[1] = edt[1];
45
return
true
;
46
}
47
48
@Override
49
protected
byte[]
getUniqueIdentifierData
() {
return
mUniqueId;}
50
51
}
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.DefaultNodeProfile
DefaultNodeProfile()
Definition:
DefaultNodeProfile.java:14
com.sonycsl.echo.processing.defaults.DefaultNodeProfile
Definition:
DefaultNodeProfile.java:7
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.getIdentificationNumber
byte[] getIdentificationNumber()
Definition:
DefaultNodeProfile.java:36
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.getManufacturerCode
byte[] getManufacturerCode()
Definition:
DefaultNodeProfile.java:20
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.setUniqueIdentifierData
boolean setUniqueIdentifierData(byte[] edt)
Definition:
DefaultNodeProfile.java:39
com.sonycsl.echo.eoj.profile.NodeProfile.inform
Informer inform()
Definition:
NodeProfile.java:494
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.changeOperatingStatus
void changeOperatingStatus(boolean status)
Definition:
DefaultNodeProfile.java:25
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.getOperatingStatus
byte[] getOperatingStatus()
Definition:
DefaultNodeProfile.java:23
com.sonycsl.echo.eoj.profile.NodeProfile
Definition:
NodeProfile.java:36
com.sonycsl.echo.processing.defaults.DefaultNodeProfile.getUniqueIdentifierData
byte[] getUniqueIdentifierData()
Definition:
DefaultNodeProfile.java:49
Generated on Mon Feb 10 2014 10:26:12 for OpenECHO by
1.8.6