public class NanoApp extends Object
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<NanoApp> |
CREATOR |
Constructor and Description |
---|
NanoApp()
If this version of the constructor is used, the methods
setAppBinary(byte[]) and setAppId(int) must be called
prior to passing this object to any managers. |
NanoApp(int appId,
byte[] appBinary)
Initialize a NanoApp with the given id and binary.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
byte[] |
getAppBinary()
get the binary for this app
|
int |
getAppId()
get the identifier of the app
|
int |
getAppVersion()
get the app version
|
String |
getName()
get the name of the app
|
int |
getNeededExecMemBytes()
executable memory needed in bytes
|
int |
getNeededReadMemBytes()
get the ammount of readable memory needed by this app
|
int[] |
getNeededSensors()
get the sensors needed by this app
|
int |
getNeededWriteMemBytes()
get the ammount og writable memory needed in bytes
|
int[] |
getOutputEvents()
get the events generated by this app
|
String |
getPublisher()
get the publisher name
|
void |
setAppBinary(byte[] appBinary)
set output events returned by the nano app
|
void |
setAppId(int appId)
set the app identifier
|
void |
setAppVersion(int appVersion)
Set the app version
|
void |
setName(String name)
set the name of the app
|
void |
setNeededExecMemBytes(int neededExecMemBytes)
set executable memory needed
|
void |
setNeededReadMemBytes(int neededReadMemBytes)
set memory needed as read only
|
void |
setNeededSensors(int[] neededSensors)
set the sensors needed for this app
|
void |
setNeededWriteMemBytes(int neededWriteMemBytes)
set writable memory needed in bytes
|
void |
setOutputEvents(int[] outputEvents) |
void |
setPublisher(String publisher)
Set the publisher name
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel out,
int flags) |
public static final Parcelable.Creator<NanoApp> CREATOR
public NanoApp()
setAppBinary(byte[])
and setAppId(int)
must be called
prior to passing this object to any managers.NanoApp(int, byte[])
public NanoApp(int appId, byte[] appBinary)
public void setPublisher(String publisher)
publisher
- name of the publisher of this nano apppublic void setName(String name)
name
- name of the apppublic void setAppId(int appId)
appId
- add identifierpublic void setAppVersion(int appVersion)
appVersion
- app versionpublic void setNeededReadMemBytes(int neededReadMemBytes)
neededReadMemBytes
- read only memory needed in bytespublic void setNeededWriteMemBytes(int neededWriteMemBytes)
neededWriteMemBytes
- writable memory needed in bytespublic void setNeededExecMemBytes(int neededExecMemBytes)
neededExecMemBytes
- executable memory needed in bytespublic void setNeededSensors(int[] neededSensors)
neededSensors
- needed Sensorspublic void setOutputEvents(int[] outputEvents)
public void setAppBinary(byte[] appBinary)
appBinary
- generated eventspublic String getPublisher()
public String getName()
public int getAppId()
public int getAppVersion()
public int getNeededReadMemBytes()
public int getNeededWriteMemBytes()
public int getNeededExecMemBytes()
public int[] getNeededSensors()
public int[] getOutputEvents()
public byte[] getAppBinary()
public int describeContents()
public void writeToParcel(Parcel out, int flags)
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())