public class World
extends java.lang.Object
Interfacing with dyn4j starts with this class. Create a new instance of this class and add bodies and joints. Then call one of the update or step methods in your game loop to move the physics engine forward in time.
Via the addListener(Listener)
method, a World
instance can have multiple listeners for all the listener types.
Some listener types return a boolean to indicate continuing or allowing something, like CollisionListener
. If, for example,
there are multiple CollisionListener
s and any one of them returns false for an event, the collision is skipped. However,
all listeners will still be called no matter if the first returned false.
Employs the same Island
solving technique as Box2d's equivalent class.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Body> |
bodies
The
Body list |
protected Bounds |
bounds
The world
Bounds |
protected BroadphaseDetector<Body> |
broadphaseDetector
|
protected CoefficientMixer |
coefficientMixer
The
CoefficientMixer |
protected ContactManager |
contactManager
The
ContactManager |
static Vector2 |
EARTH_GRAVITY
Earths gravity constant
|
protected Vector2 |
gravity
The world gravity vector
|
protected Island |
island
The reusable island
|
protected java.util.List<Joint> |
joints
The
Joint list |
protected java.util.List<Listener> |
listeners
The list of listeners for this world
|
protected ManifoldSolver |
manifoldSolver
The
ManifoldSolver |
protected NarrowphaseDetector |
narrowphaseDetector
|
protected RaycastDetector |
raycastDetector
The
RaycastDetector |
protected Settings |
settings
The dynamics settings for this world
|
protected Step |
step
The
Step used by the dynamics calculations |
protected double |
time
The accumulated time
|
protected TimeOfImpactDetector |
timeOfImpactDetector
|
protected TimeOfImpactSolver |
timeOfImpactSolver
|
protected boolean |
updateRequired
Flag to find new contacts
|
protected java.lang.Object |
userData
The application data associated
|
static Vector2 |
ZERO_GRAVITY
Zero gravity constant
|
| Constructor and Description |
|---|
World()
Default constructor.
|
World(Bounds bounds)
Optional constructor.
|
World(Capacity initialCapacity)
Optional constructor.
|
World(Capacity initialCapacity,
Bounds bounds)
Full constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Body body)
Deprecated.
replaced with
addBody(Body) in 3.1.1 |
void |
add(Joint joint)
Deprecated.
replaced with
addJoint(Joint) in 3.1.1 |
void |
addBody(Body body)
|
void |
addJoint(Joint joint)
|
void |
addListener(Listener listener)
Adds the given listener to the list of listeners.
|
boolean |
containsBody(Body body)
Returns true if this world contains the given body.
|
boolean |
containsJoint(Joint joint)
Returns true if this world contains the given joint.
|
boolean |
containsListener(Listener listener)
Returns true if the given listener is already attached to this world.
|
boolean |
convexCast(Convex convex,
Transform transform,
Vector2 dp,
Body body,
boolean ignoreSensors,
ConvexCastResult result)
Performs a linear convex cast on the given body, placing a detected collision into the given result object.
|
boolean |
convexCast(Convex convex,
Transform transform,
Vector2 dp,
boolean ignoreSensors,
boolean all,
java.util.List<ConvexCastResult> results)
Performs a linear convex cast on the world, placing any detected collisions into the given results list.
|
boolean |
convexCast(Convex convex,
Transform transform,
Vector2 dp,
double da,
Body body,
boolean ignoreSensors,
ConvexCastResult result)
Performs a linear convex cast on the given body, placing a detected collision into the given result object.
|
boolean |
convexCast(Convex convex,
Transform transform,
Vector2 dp,
double da,
boolean ignoreSensors,
boolean all,
java.util.List<ConvexCastResult> results)
Performs a linear convex cast on the world, placing any detected collisions into the given results list.
|
protected void |
detect()
Finds new contacts for all bodies in this world.
|
java.util.List<Body> |
detect(AABB aabb)
Returns a list of bodies within the specified (world-space) axis-aligned bounding box.
|
java.util.List<Body> |
detect(Convex convex)
Returns a list of bodies within the specified convex shape.
|
java.util.List<Body> |
detect(Convex convex,
Transform transform)
Returns a list of bodies within the specified convex shape.
|
java.util.List<Body> |
getBodies()
Returns a new list containing all the bodies in this world.
|
Body |
getBody(int index)
Returns the
Body at the given index. |
int |
getBodyCount()
|
Bounds |
getBounds()
Returns the bounds of the world.
|
BroadphaseDetector<Body> |
getBroadphaseDetector()
Returns the broad-phase collision detection algorithm.
|
CoefficientMixer |
getCoefficientMixer()
Returns the
CoefficientMixer . |
ContactManager |
getContactManager()
Returns the
ContactManager . |
Vector2 |
getGravity()
Returns the gravity.
|
Joint |
getJoint(int index)
Returns the
Joint at the given index. |
int |
getJointCount()
|
java.util.List<Joint> |
getJoints()
Returns a new list containing all the joints in this world.
|
int |
getListenerCount()
Returns the total number of listeners attached to this world.
|
<T extends Listener> |
getListenerCount(java.lang.Class<T> clazz)
Returns the total number of listeners of the given type attached
to this world.
|
<T extends Listener> |
getListeners(java.lang.Class<T> clazz)
Returns the listeners that are of the given type
or sub types of the given type.
|
<T extends Listener> |
getListeners(java.lang.Class<T> clazz,
java.util.List<T> listeners)
Returns the listeners of the given type (or sub types) in the given list.
|
ManifoldSolver |
getManifoldSolver()
Returns the manifold solver.
|
NarrowphaseDetector |
getNarrowphaseDetector()
Returns the narrow-phase collision detection algorithm.
|
RaycastDetector |
getRaycastDetector()
Returns the raycast detector.
|
Settings |
getSettings()
Returns the settings for this world.
|
Step |
getStep()
Returns the
Step object used to advance
the simulation. |
TimeOfImpactDetector |
getTimeOfImpactDetector()
Returns the time of impact detector.
|
java.lang.Object |
getUserData()
Returns the custom application data associated with this
World . |
boolean |
isEmpty()
Returns true if this world doesn't contain any
bodies or joints.
|
boolean |
isUpdateRequired()
Returns true if upon the next time step the contacts must be updated.
|
boolean |
raycast(Ray ray,
Body body,
double maxLength,
boolean ignoreSensors,
RaycastResult result)
Performs a raycast against the given
Body and returns true
if the ray intersects the body. |
boolean |
raycast(Ray ray,
double maxLength,
boolean ignoreSensors,
boolean all,
java.util.List<RaycastResult> results)
|
boolean |
raycast(Vector2 start,
Vector2 end,
Body body,
boolean ignoreSensors,
RaycastResult result)
Performs a raycast against the given
Body and returns true
if the ray intersects the body. |
boolean |
raycast(Vector2 start,
Vector2 end,
boolean ignoreSensors,
boolean all,
java.util.List<RaycastResult> results)
|
boolean |
remove(Body body)
Deprecated.
replaced with
removeBody(Body) in 3.1.1 |
boolean |
remove(Body body,
boolean notify)
Deprecated.
replaced with
removeBody(Body, boolean) in 3.1.1 |
boolean |
remove(Joint joint)
Deprecated.
replaced with
removeJoint(Joint) in 3.1.1 |
void |
removeAll()
Deprecated.
replaced with
removeAllBodiesAndJoints() in 3.1.1 |
void |
removeAll(boolean notify)
Deprecated.
replaced with
removeAllBodiesAndJoints(boolean) in 3.1.1 |
void |
removeAllBodies()
This is a convenience method for the
removeAllBodiesAndJoints() method since all joints will be removed
when all bodies are removed. |
void |
removeAllBodies(boolean notify)
This is a convenience method for the
removeAllBodiesAndJoints(boolean) method since all joints will be removed
when all bodies are removed. |
void |
removeAllBodiesAndJoints()
Removes all the joints and bodies from the world.
|
void |
removeAllBodiesAndJoints(boolean notify)
Removes all the joints and bodies from the world.
|
void |
removeAllJoints()
|
void |
removeAllJoints(boolean notify)
|
int |
removeAllListeners()
Removes all the listeners.
|
<T extends Listener> |
removeAllListeners(java.lang.Class<T> clazz)
Removes all the listeners of the specified type.
|
boolean |
removeBody(Body body)
|
boolean |
removeBody(Body body,
boolean notify)
|
boolean |
removeJoint(Joint joint)
|
boolean |
removeListener(Listener listener)
Removes the given listener.
|
void |
removeListeners()
Deprecated.
replaced with
removeAllListeners() in 3.1.1 |
void |
setBounds(Bounds bounds)
Sets the bounds of the
World . |
void |
setBroadphaseDetector(BroadphaseDetector<Body> broadphaseDetector)
Sets the broad-phase collision detection algorithm.
|
void |
setCoefficientMixer(CoefficientMixer coefficientMixer)
Sets the
CoefficientMixer . |
void |
setGravity(Vector2 gravity)
Sets the gravity.
|
void |
setManifoldSolver(ManifoldSolver manifoldSolver)
Sets the manifold solver.
|
void |
setNarrowphaseDetector(NarrowphaseDetector narrowphaseDetector)
Sets the narrow-phase collision detection algorithm.
|
void |
setRaycastDetector(RaycastDetector raycastDetector)
Sets the raycast detector.
|
void |
setSettings(Settings settings)
Sets the dynamics settings for this world.
|
void |
setTimeOfImpactDetector(TimeOfImpactDetector timeOfImpactDetector)
Sets the time of impact detector.
|
void |
setUpdateRequired(boolean flag)
Sets the update required flag.
|
void |
setUserData(java.lang.Object userData)
Sets the custom application data associated with this
World . |
void |
shiftCoordinates(Vector2 shift)
Shifts the coordinates of the entire world by the given amount.
|
protected void |
solveTOI(Body body1,
java.util.List<TimeOfImpactListener> listeners)
Solves the time of impact for the given
Body . |
protected void |
solveTOI(Settings.ContinuousDetectionMode mode)
|
protected void |
step()
|
void |
step(int steps)
Performs the given number of simulation steps using the step frequency in
Settings . |
void |
step(int steps,
double elapsedTime)
Performs the given number of simulation steps using the given elapsed time for each step.
|
boolean |
update(double elapsedTime)
Updates the
World . |
void |
updatev(double elapsedTime)
Updates the
World . |
public static final Vector2 EARTH_GRAVITY
public static final Vector2 ZERO_GRAVITY
protected Settings settings
protected Vector2 gravity
protected BroadphaseDetector<Body> broadphaseDetector
protected NarrowphaseDetector narrowphaseDetector
protected ManifoldSolver manifoldSolver
ManifoldSolver
protected TimeOfImpactDetector timeOfImpactDetector
protected RaycastDetector raycastDetector
RaycastDetector
protected ContactManager contactManager
ContactManager
protected CoefficientMixer coefficientMixer
CoefficientMixer
protected TimeOfImpactSolver timeOfImpactSolver
protected java.util.List<Listener> listeners
protected java.lang.Object userData
protected Island island
protected double time
protected boolean updateRequired
public World()
Builds a simulation World
without bounds.
Defaults to using EARTH_GRAVITY
, DynamicAABBTree
broad-phase,
Gjk
narrow-phase, and ClippingManifoldSolver
.
Uses the Capacity.DEFAULT_CAPACITY
capacity object for initialization.
public World(Capacity initialCapacity)
Defaults to using EARTH_GRAVITY
, DynamicAABBTree
broad-phase,
Gjk
narrow-phase, and ClippingManifoldSolver
.
The initial capacity specifies the estimated number of bodies that the simulation will have at any one time. This is used to size internal structures to improve performance. The internal structures can grow past the initial capacity.
initialCapacity
- the initial capacity settingspublic World(Bounds bounds)
Defaults to using EARTH_GRAVITY
, DynamicAABBTree
broad-phase,
Gjk
narrow-phase, and ClippingManifoldSolver
.
bounds
- the bounds of the World
; can be nullpublic World(Capacity initialCapacity, Bounds bounds)
Defaults to using EARTH_GRAVITY
, DynamicAABBTree
broad-phase,
Gjk
narrow-phase, and ClippingManifoldSolver
.
The initial capacity specifies the estimated number of bodies that the simulation will have at any one time. This is used to size internal structures to improve performance. The internal structures can grow past the initial capacity.
initialCapacity
- the initial capacity settingsbounds
- the bounds of the World
; can be nulljava.lang.NullPointerException
- if initialCapacity is nullpublic boolean update(double elapsedTime)
World
.
This method will only update the world given the step frequency contained
in the Settings
object. You can use the StepListener
interface
to listen for when a step is actually performed. In addition, this method will
return true if a step was performed.
Alternatively you can call the updatev(double)
method to use a variable
time step.
This method immediately returns if the given elapsedTime is less than or equal to zero.
elapsedTime
- the elapsed time in secondsWorld
performed a simulation stepupdatev(double)
public void updatev(double elapsedTime)
World
.
This method will update the world on every call. Unlike the update(double)
method, this method uses the given elapsed time and does not attempt to update the world
in a set interval.
This method immediately returns if the given elapsedTime is less than or equal to zero.
elapsedTime
- the elapsed time in secondsupdate(double)
public void step(int steps)
Settings
.steps
- the number of simulation steps to performpublic void step(int steps, double elapsedTime)
This method immediately returns if the given elapsedTime is less than or equal to zero.
steps
- the number of simulation steps to performelapsedTime
- the elapsed time for each stepprotected void step()
protected void detect()
This method performs the following:
This method will notify all bounds and collision listeners. If any CollisionListener
returns false, the collision is ignored.
This method also notifies using the ContactListener.sensed(ContactPoint)
,
ContactListener.begin(ContactPoint)
,
ContactListener.persist(org.dyn4j.dynamics.contact.PersistedContactPoint)
, and
ContactListener.end(ContactPoint)
methods.
protected void solveTOI(Settings.ContinuousDetectionMode mode)
Body
s in this World
.
This method solves for the time of impact for each Body
iteratively
and pairwise.
The cases considered are dependent on the given collision detection mode.
Cases skipped (including the converse of the above):
mode
- the continuous collision detection modeSettings.ContinuousDetectionMode
protected void solveTOI(Body body1, java.util.List<TimeOfImpactListener> listeners)
Body
.
This method will find the first Body
that the given Body
collides with unless ignored via the TimeOfImpactListener
.
If any TimeOfImpactListener
doesn't allow the collision the collision
is ignored.
After the first Body
is found the two Body
s are interpolated
to the time of impact.
Then the Body
s are position solved using the TimeOfImpactSolver
to force the Body
s into collision. This causes the discrete collision
detector to detect the collision on the next time step.
body1
- the Body
listeners
- the list of TimeOfImpactListener
spublic boolean raycast(Vector2 start, Vector2 end, boolean ignoreSensors, boolean all, java.util.List<RaycastResult> results)
Body
s in the World
.
The given RaycastResult
list, results, will be filled with the raycast results
if the given ray intersected any bodies.
The RaycastResult
class implements the Comparable interface to allow sorting by
distance from the ray's origin.
If the all flag is false, the results list will only contain the closest result (if any).
All raycasts pass through the RaycastListener
s before being tested. If any
RaycastListener
doesn't allow the raycast then the body will not be tested.
Bodies that contain the start of the ray will not be included in the results.
start
- the start pointend
- the end pointignoreSensors
- true if sensor BodyFixture
s should be ignoredall
- true if all intersected Body
s should be returned; false if only the closest Body
should be returnedresults
- a list to contain the results of the raycastBody
was intersected by the Ray
java.lang.NullPointerException
- if start, end, or results is nullraycast(Ray, double, boolean, boolean, List)
,
RaycastListener.allow(Ray, Body)
,
RaycastListener.allow(Ray, Body, BodyFixture)
public boolean raycast(Ray ray, double maxLength, boolean ignoreSensors, boolean all, java.util.List<RaycastResult> results)
Body
s in the World
.
The given RaycastResult
list, results, will be filled with the raycast results
if the given ray intersected any bodies.
The RaycastResult
class implements the Comparable interface to allow sorting by
distance from the ray's origin.
If the all flag is false, the results list will only contain the closest result (if any).
Pass 0 into the maxLength field to specify an infinite length Ray
.
All raycasts pass through the RaycastListener
s before being tested. If any
RaycastListener
doesn't allow the raycast then the body will not be tested.
Bodies that contain the start of the ray will not be included in the results.
ray
- the Ray
maxLength
- the maximum length of the ray; 0 for infinite lengthignoreSensors
- true if sensor BodyFixture
s should be ignoredall
- true if all intersected Body
s should be returned; false if only the closest Body
should be returnedresults
- a list to contain the results of the raycastBody
was intersected by the given Ray
java.lang.NullPointerException
- if ray or results is nullraycast(Vector2, Vector2, boolean, boolean, List)
,
RaycastListener.allow(Ray, Body)
,
RaycastListener.allow(Ray, Body, BodyFixture)
public boolean raycast(Vector2 start, Vector2 end, Body body, boolean ignoreSensors, RaycastResult result)
Body
and returns true
if the ray intersects the body.
The given RaycastResult
object, result, will be filled with the raycast result
if the given ray intersected the given body.
All raycasts pass through the RaycastListener
s before being tested. If any
RaycastListener
doesn't allow the raycast then the body will not be tested.
Returns false if the start position of the ray lies inside the given body.
start
- the start pointend
- the end pointbody
- the Body
to testignoreSensors
- whether or not to ignore sensor BodyFixture
sresult
- the raycast resultRay
intersects the Body
java.lang.NullPointerException
- if start, end, body, or result is nullraycast(Ray, Body, double, boolean, RaycastResult)
,
RaycastListener.allow(Ray, Body, BodyFixture)
public boolean raycast(Ray ray, Body body, double maxLength, boolean ignoreSensors, RaycastResult result)
Body
and returns true
if the ray intersects the body.
The given RaycastResult
object, result, will be filled with the raycast result
if the given ray intersected the given body.
Pass 0 into the maxLength field to specify an infinite length Ray
.
All raycasts pass through the RaycastListener
s before being tested. If any
RaycastListener
doesn't allow the raycast then the body will not be tested.
Returns false if the start position of the ray lies inside the given body.
ray
- the Ray
to castbody
- the Body
to testmaxLength
- the maximum length of the ray; 0 for infinite lengthignoreSensors
- whether or not to ignore sensor BodyFixture
sresult
- the raycast resultRay
intersects the Body
java.lang.NullPointerException
- if ray, body, or result is nullraycast(Vector2, Vector2, Body, boolean, RaycastResult)
,
RaycastListener.allow(Ray, Body, BodyFixture)
public boolean convexCast(Convex convex, Transform transform, Vector2 dp, boolean ignoreSensors, boolean all, java.util.List<ConvexCastResult> results)
This method does a static test of bodies (in other words, does not take into account the bodies linear or angular velocity, but rather assumes they are stationary).
The dp
parameter is the linear cast vector determining the direction and magnitude of the cast.
The ConvexCastResult
class implements the Comparable interface to allow sorting by
the time of impact.
If the all flag is false, the results list will only contain the closest result (if any).
All convex casts pass through the ConvexCastListener
s before being tested. If any
ConvexCastListener
doesn't allow the convex cast, then the body will not be tested.
For multi-fixtured bodies, only the fixture that has the minimum time of impact will be added to the results list.
Bodies in collision with the given convex at the begining of the cast are not included in the results.
convex
- the convex to casttransform
- the initial position and orientation of the convexdp
- Δposition; the change in position (the cast length and direction basically)ignoreSensors
- true if sensor fixtures should be ignored in the testsall
- true if all hits should be returned; false if only the first should be returnedresults
- the list to add the results toconvexCast(Convex, Transform, Vector2, double, boolean, boolean, List)
public boolean convexCast(Convex convex, Transform transform, Vector2 dp, double da, boolean ignoreSensors, boolean all, java.util.List<ConvexCastResult> results)
This method does a static test of bodies (in other words, does not take into account the bodies linear or angular velocity, but rather assumes they are stationary).
The dp
parameter is the linear cast vector determining the direction and magnitude of the cast.
The da
parameter is the change in angle over the linear cast and is interpolated linearly
during detection.
The ConvexCastResult
class implements the Comparable interface to allow sorting by
the time of impact.
If the all flag is false, the results list will only contain the closest result (if any).
All convex casts pass through the ConvexCastListener
s before being tested. If any
ConvexCastListener
doesn't allow the convex cast, then the body will not be tested.
For multi-fixtured bodies, only the fixture that has the minimum time of impact will be added to the results list.
Bodies in collision with the given convex at the begining of the cast are not included in the results.
convex
- the convex to casttransform
- the initial position and orientation of the convexdp
- Δposition; the change in position (the cast length and direction basically)da
- Δangle; the change in the angle; this is the change in the angle over the linear periodignoreSensors
- true if sensor fixtures should be ignored in the testsall
- true if all hits should be returned; false if only the first should be returnedresults
- the list to add the results topublic boolean convexCast(Convex convex, Transform transform, Vector2 dp, Body body, boolean ignoreSensors, ConvexCastResult result)
This method does a static test of the body (in other words, does not take into account the body's linear or angular velocity, but rather assumes it is stationary).
The dp
parameter is the linear cast vector determining the direction and magnitude of the cast.
All convex casts pass through the ConvexCastListener
s before being tested. If any
ConvexCastListener
doesn't allow the convex cast, then the body will not be tested.
For multi-fixtured bodies, the fixture that has the minimum time of impact will be the result.
Returns false if the given body and convex are in collision at the beginning of the cast.
convex
- the convex to casttransform
- the initial position and orientation of the convexdp
- Δposition; the change in position (the cast length and direction basically)body
- the body to cast againstignoreSensors
- true if sensor fixtures should be ignored in the testsresult
- the convex cast resultpublic boolean convexCast(Convex convex, Transform transform, Vector2 dp, double da, Body body, boolean ignoreSensors, ConvexCastResult result)
This method does a static test of the body (in other words, does not take into account the body's linear or angular velocity, but rather assumes it is stationary).
The dp
parameter is the linear cast vector determining the direction and magnitude of the cast.
The da
parameter is the change in angle over the linear cast and is interpolated linearly
during detection.
All convex casts pass through the ConvexCastListener
s before being tested. If any
ConvexCastListener
doesn't allow the convex cast, then the body will not be tested.
For multi-fixtured bodies, the fixture that has the minimum time of impact will be the result.
Returns false if the given body and convex are in collision at the beginning of the cast.
convex
- the convex to casttransform
- the initial position and orientation of the convexdp
- Δposition; the change in position (the cast length and direction basically)da
- Δangle; the change in the angle; this is the change in the angle over the linear periodbody
- the body to cast againstignoreSensors
- true if sensor fixtures should be ignored in the testsresult
- the convex cast resultpublic java.util.List<Body> detect(AABB aabb)
If any part of a body is contained in the AABB, it is added to the list.
This performs a static collision test of the world using the BroadphaseDetector
.
public java.util.List<Body> detect(Convex convex)
If any part of a body is contained in the convex, it is added to the list.
Use the Body.isInContact(Body)
method instead if you want to test if two bodies
are colliding.
convex
- the convex shape in world coordinatesBody
> a list of bodies within the given convex shapepublic java.util.List<Body> detect(Convex convex, Transform transform)
If any part of a body is contained in the convex, it is added to the list.
Use the Body.isInContact(Body)
method instead if you want to test if two bodies
are colliding.
convex
- the convex shape in local coordinatestransform
- the convex shape's world transformBody
> a list of bodies within the given convex shapepublic void shiftCoordinates(Vector2 shift)
NewPosition = OldPosition + shiftThis method is useful in situations where the world is very large causing very large numbers to be used in the computations. Shifting the coordinate system allows the computations to be localized and retain accuracy.
This method modifies the coordinates of every body and joint in the world.
Adding joints or bodies after this method is called should consider that everything has been shifted.
This method does NOT require a call to setUpdateRequired(boolean)
.
shift
- the distance to shift along the x and y axespublic void addBody(Body body)
body
- the Body
to addjava.lang.NullPointerException
- if body is nulljava.lang.IllegalArgumentException
- if body has already been added to this world or if its a member of another world instancepublic void addJoint(Joint joint)
joint
- the Joint
to addjava.lang.NullPointerException
- if joint is nulljava.lang.IllegalArgumentException
- if joint has already been added to this world or if its a member of another world instancepublic boolean containsBody(Body body)
body
- the Body
to test forpublic boolean containsJoint(Joint joint)
joint
- the Joint
to test forpublic boolean removeBody(Body body)
Body
from the World
.
Use the removeBody(Body, boolean)
method to enable implicit
destruction notification.
body
- the Body
to remove.public boolean removeBody(Body body, boolean notify)
Body
from the World
.
When a body is removed, joints and contacts may be implicitly destroyed.
Pass true to the notify parameter to be notified the destruction of these objects
via the DestructionListener
s.
body
- the Body
to removenotify
- true if implicit destruction should be notifiedpublic boolean removeJoint(Joint joint)
public void removeAllBodiesAndJoints()
This method does not notify of destroyed objects.
removeAllBodiesAndJoints(boolean)
public void removeAllBodiesAndJoints(boolean notify)
This method will remove the joints and contacts from all Body
s.
notify
- true if destruction of joints and contacts should be notified of by the DestructionListener
public void removeAllBodies()
removeAllBodiesAndJoints()
method since all joints will be removed
when all bodies are removed.
This method does not notify of the destroyed contacts, joints, etc.
removeAllBodies(boolean)
public void removeAllBodies(boolean notify)
removeAllBodiesAndJoints(boolean)
method since all joints will be removed
when all bodies are removed.notify
- true if destruction of joints and contacts should be notified of by the DestructionListener
public void removeAllJoints()
removeAllJoints(boolean)
public void removeAllJoints(boolean notify)
notify
- true if destruction of joints should be notified of by the DestructionListener
public boolean isUpdateRequired()
setUpdateRequired(boolean)
public void setUpdateRequired(boolean flag)
Set this flag to true if any of the following conditions have been met:
flag
- the flagpublic Settings getSettings()
Settings
public void setSettings(Settings settings)
settings
- the desired settingspublic void setGravity(Vector2 gravity)
Setting the gravity vector to the zero vector eliminates gravity.
gravity
- the gravity in meters/second2java.lang.NullPointerException
- if gravity is nullpublic Vector2 getGravity()
Vector2
the gravity in meters/second2public void setBounds(Bounds bounds)
World
.bounds
- the bounds; can be nullpublic Bounds getBounds()
This will return null if no bounds were initially set
or if it was set to null via the setBounds(Bounds)
method.
Bounds
the boundspublic <T extends Listener> java.util.List<T> getListeners(java.lang.Class<T> clazz)
Returns an empty list if no listeners for the given type are found.
Returns null if clazz is null.
Example usage:
world.getListeners(ContactListener.class);
T
- the listener typeclazz
- the type of listener to getpublic <T extends Listener> void getListeners(java.lang.Class<T> clazz, java.util.List<T> listeners)
This method does not clear the given listeners list before adding the listeners.
If clazz or listeners is null, this method immediately returns.
Example usage:
List<ContactListener> list = ...; world.getListeners(ContactListener.class, list);
T
- the listener typeclazz
- the type of listener to getlisteners
- the list to add the listeners topublic void addListener(Listener listener)
listener
- the listenerjava.lang.NullPointerException
- if the given listener is nulljava.lang.IllegalArgumentException
- if the given listener has already been added to this worldpublic boolean containsListener(Listener listener)
listener
- the listenerpublic boolean removeListener(Listener listener)
listener
- the listener to removepublic int removeAllListeners()
public <T extends Listener> int removeAllListeners(java.lang.Class<T> clazz)
Returns zero if the given type is null or there are zero listeners attached.
Example usage:
world.removeAllListeners(ContactListener.class);
T
- the listener typeclazz
- the listener typepublic int getListenerCount()
public <T extends Listener> int getListenerCount(java.lang.Class<T> clazz)
Returns zero if the given class type is null.
Example usage:
world.getListenerCount(BoundsListener.class);
T
- the listener typeclazz
- the listener typepublic void setBroadphaseDetector(BroadphaseDetector<Body> broadphaseDetector)
If the given detector is null then the default SapIncremental
BroadphaseDetector
is set as the current broad phase.
broadphaseDetector
- the broad-phase collision detection algorithmjava.lang.NullPointerException
- if broadphaseDetector is nullpublic BroadphaseDetector<Body> getBroadphaseDetector()
BroadphaseDetector
the broad-phase collision detection algorithmpublic void setNarrowphaseDetector(NarrowphaseDetector narrowphaseDetector)
If the given detector is null then the default Gjk
NarrowphaseDetector
is set as the current narrow phase.
narrowphaseDetector
- the narrow-phase collision detection algorithmjava.lang.NullPointerException
- if narrowphaseDetector is nullpublic NarrowphaseDetector getNarrowphaseDetector()
NarrowphaseDetector
the narrow-phase collision detection algorithmpublic void setManifoldSolver(ManifoldSolver manifoldSolver)
manifoldSolver
- the manifold solverjava.lang.NullPointerException
- if manifoldSolver is nullpublic ManifoldSolver getManifoldSolver()
ManifoldSolver
the manifold solverpublic void setTimeOfImpactDetector(TimeOfImpactDetector timeOfImpactDetector)
timeOfImpactDetector
- the time of impact detectorjava.lang.NullPointerException
- if timeOfImpactDetector is nullpublic TimeOfImpactDetector getTimeOfImpactDetector()
TimeOfImpactDetector
the time of impact detectorpublic void setRaycastDetector(RaycastDetector raycastDetector)
raycastDetector
- the raycast detectorjava.lang.NullPointerException
- if raycastDetector is nullpublic RaycastDetector getRaycastDetector()
RaycastDetector
the raycast detectorpublic CoefficientMixer getCoefficientMixer()
CoefficientMixer
.CoefficientMixer
setCoefficientMixer(CoefficientMixer)
public void setCoefficientMixer(CoefficientMixer coefficientMixer)
CoefficientMixer
.
A CoefficientMixer
is an implementation of mixing functions for various
coefficients used in contact solving. Common coefficients are restitution and
friction. Since each BodyFixture
can have it's own value for these
coefficients, the CoefficientMixer
is used to mathematically combine them
into one coefficient to be used in contact resolution.
Uses CoefficientMixer.DEFAULT_MIXER
by default.
coefficientMixer
- the coefficient mixerjava.lang.NullPointerException
- if coefficientMixer is nullCoefficientMixer
public ContactManager getContactManager()
ContactManager
.
The contact manager is used to store contacts for the purpose of notifications
via the ContactListener
and to warm start contacts for better simulation
speed and accuracy.
This method should rarely be used by application code.
ContactManager
public java.lang.Object getUserData()
World
.public void setUserData(java.lang.Object userData)
World
.userData
- the application datapublic int getBodyCount()
public Body getBody(int index)
Body
at the given index.index
- the indexBody
public java.util.List<Body> getBodies()
Body
>public int getJointCount()
public Joint getJoint(int index)
Joint
at the given index.index
- the indexJoint
public java.util.List<Joint> getJoints()
Joint
>public Step getStep()
Step
object used to advance
the simulation.
The returned object contains the step information (elapsed time) for the last and the previous time step.
Step
the current step objectpublic boolean isEmpty()
@Deprecated public void add(Body body)
addBody(Body)
in 3.1.1body
- the Body
to addjava.lang.NullPointerException
- if body is nulljava.lang.IllegalArgumentException
- if body has already been added to this world or if its a member of another world instanceaddBody(Body)
@Deprecated public void add(Joint joint)
addJoint(Joint)
in 3.1.1joint
- the Joint
to addjava.lang.NullPointerException
- if joint is nulljava.lang.IllegalArgumentException
- if joint has already been added to this world or if its a member of another world instanceaddJoint(Joint)
@Deprecated public boolean remove(Body body)
removeBody(Body)
in 3.1.1Body
from the World
.
Use the remove(Body, boolean)
method to enable implicit
destruction notification.
body
- the Body
to remove.removeBody(Body)
@Deprecated public boolean remove(Body body, boolean notify)
removeBody(Body, boolean)
in 3.1.1Body
from the World
.
When a body is removed, joints and contacts may be implicitly destroyed.
Pass true to the notify parameter to be notified the destruction of these objects
via the DestructionListener
s.
body
- the Body
to removenotify
- true if implicit destruction should be notifiedremoveBody(Body, boolean)
@Deprecated public boolean remove(Joint joint)
removeJoint(Joint)
in 3.1.1Joint
from the World
.
When joints are removed no other objects are implicitly destroyed.
joint
- the Joint
to removeJoint
was removedremoveJoint(Joint)
@Deprecated public void removeAll()
removeAllBodiesAndJoints()
in 3.1.1This method does not notify of destroyed objects.
Renamed from clear (3.0.0 and below).
removeAllBodiesAndJoints()
@Deprecated public void removeAll(boolean notify)
removeAllBodiesAndJoints(boolean)
in 3.1.1
This method will remove the joints and contacts from all Body
s.
Renamed from clear (3.0.0 to 1.0.2).
notify
- true if destruction of joints and contacts should be notified of by the DestructionListener
removeAllBodiesAndJoints(boolean)
@Deprecated public void removeListeners()
removeAllListeners()
in 3.1.1removeAllListeners()


|
HexFiend
|
A central class that acts as the controller layer for HexFiend.framework. More...
Instance Methods | |
Property transactions | |
Methods for temporarily delaying notifying representers of property changes. There is a property transaction stack, and all property changes are collected until the last token is popped off the stack, at which point all representers are notified of all collected changes via representerChangedProperties:. To use this, call beginPropertyChangeTransaction, and record the token that is returned. Pass it to endPropertyChangeTransaction: to notify representers of all changed properties in bulk. Tokens cannot be popped out of order - they are used only as a correctness check. | |
| (NSUInteger) | - beginPropertyChangeTransaction |
| (void) | - endPropertyChangeTransaction: |
Properties shared between all representers | |
The following properties are considered global among all HFRepresenters attached to the receiver. | |
| (unsigned long long) | - totalLineCount |
| (NSUInteger) | - bytesPerLine |
| (CGFloat) | - lineHeight |
Selection pulsing | |
Used to show the current selection after a change, similar to Find in Safari | |
| (void) | - pulseSelection |
| (double) | - selectionPulseAmount |
| (void) | - representer:changedProperties: |
Mouse selection | |
Methods to handle mouse selection. Representers that allow text selection should call beginSelectionWithEvent:forByteIndex: upon receiving a mouseDown event, and then continueSelectionWithEvent:forByteIndex: for mouseDragged events, terminating with endSelectionWithEvent:forByteIndex: upon receiving the mouse up. HFController will compute the correct selected ranges and propagate any changes via the HFControllerPropertyBits mechanism. | |
| (void) | - beginSelectionWithEvent:forByteIndex: |
| (void) | - continueSelectionWithEvent:forByteIndex: |
| (void) | - endSelectionWithEvent:forByteIndex: |
Scrollling | |
Support for the mouse wheel and scroll bars. | |
| (void) | - scrollWithScrollEvent: |
| (void) | - scrollByLines: |
Keyboard navigation | |
Support for chaging the selection via the keyboard | |
| (void) | - moveInDirection:byByteCount:withSelectionTransformation:usingAnchor: |
| (void) | - moveInDirection:withGranularity:andModifySelection: |
| (void) | - moveToLineBoundaryInDirection:andModifySelection: |
Text editing | |
Methods to support common text editing operations | |
| (BOOL) | - insertByteArray:replacingPreviousBytes:allowUndoCoalescing: |
| (BOOL) | - insertData:replacingPreviousBytes:allowUndoCoalescing: |
| (void) | - deleteSelection |
| (void) | - deleteDirection: |
Reading data | |
Methods for reading data | |
| (NSData *) | - dataForRange: |
| (void) | - copyBytes:range: |
| (HFByteRangeAttributeArray *) | - byteRangeAttributeArray |
| (HFByteRangeAttributeArray *) | - attributesForBytesInRange: |
| (HFRange) | - rangeForBookmark: |
| (void) | - setRange:forBookmark: |
| (NSIndexSet *) | - bookmarksInRange: |
| (unsigned long long) | - contentsLength |
Protected Attributes | |
| _hfflags | |
Properties | |
| NSUInteger | bytesPerColumn |
| NSFont * | font |
| NSUndoManager * | undoManager |
| BOOL | editable |
| BOOL | shouldAntialias |
| BOOL | shouldColorBytes |
| BOOL | shouldShowCallouts |
| BOOL | shouldHideNullBytes |
| BOOL | shouldLiveReload |
Edit Mode | |
Determines what mode we're in, read-only, overwrite or insert. | |
| HFEditMode | editMode |
Representer handling. | |
Methods for modifying the list of HFRepresenters attached to a controller. Attached representers receive the controllerDidChange: message when various properties of the controller change. A representer may only be attached to one controller at a time. Representers are retained by the controller. | |
| NSArray * | representers |
| Gets the current array of representers attached to this controller. More... | |
| (void) | - addRepresenter: |
| Adds a new representer to this controller. More... | |
| (void) | - removeRepresenter: |
| Removes an existing representer from this controller. The representer must be present in the array of representers. More... | |
Byte array | |
| HFByteArray * | byteArray |
| (void) | - replaceByteArray: |
Selection handling | |
Methods for manipulating the current selected ranges. Hex Fiend supports discontiguous selection. | |
| NSArray * | selectedContentsRanges |
| (IBAction) | - selectAll: |
| (unsigned long long) | - minimumSelectionLocation |
| (unsigned long long) | - maximumSelectionLocation |
| (HFByteArray *) | - byteArrayForSelectedContentsRanges |
Displayed line range | |
Methods for setting and getting the current range of displayed lines. | |
| HFFPRange | displayedLineRange |
| (void) | - maximizeVisibilityOfContentsRange: |
| (void) | - centerContentsRange: |
File writing dependency handling | |
| (BOOL) | - clearUndoManagerDependenciesOnRanges:inFile:hint: |
| (BOOL) | + prepareForChangeInFile:fromWritingByteArray: |
HFController acts as the controller layer in the MVC architecture of HexFiend. The HFController plays several significant central roles, including:
An HFController is the top point of ownership for a HexFiend object graph. It retains both its ByteArray (model) and its array of Representers (views).
You create an HFController via [[HFController alloc] init]
. After that, give it an HFByteArray via setByteArray:, and some Representers via addRepresenter:. Then insert the Representers' views in a window, and you're done.
| - (void) addRepresenter: | (HFRepresenter *) | representer |
| - (void) removeRepresenter: | (HFRepresenter *) | representer |
| - (NSUInteger) beginPropertyChangeTransaction |
Begins delaying property change transactions. Returns a token that should be passed to endPropertyChangeTransactions:.
| - (void) endPropertyChangeTransaction: | (NSUInteger) | token |
Pass a token returned from beginPropertyChangeTransaction to this method to pop the transaction off the stack and, if the stack is empty, to notify Representers of all collected changes. Tokens cannot be popped out of order - they are used strictly as a correctness check.
| - (void) replaceByteArray: | (HFByteArray *) | newArray |
Replaces the entire byte array with a new one, preserving as much of the selection as possible. Unlike setByteArray:, this method is undoable, and intended to be used from representers that make a global change (such as Replace All).
| - (unsigned long long) totalLineCount |
Returns the number of lines on which the cursor may be placed. This is always at least 1, and is equivalent to (unsigned long long)(HFRoundUpToNextMultiple(contentsLength, bytesPerLine) / bytesPerLine)
| - (NSUInteger) bytesPerLine |
Indicates the number of bytes per line, which is a global property among all the line-oriented representers.
| - (CGFloat) lineHeight |
Returns the height of a line, in points. This is generally determined by the font. Representers that wish to align things to lines should use this.
| - (void) pulseSelection |
Begins selection pulsing (e.g. following a successful Find operation). Representers will receive callbacks indicating that HFControllerSelectionPulseAmount has changed.
| - (double) selectionPulseAmount |
Return the amount that the "Find pulse indicator" should show. 0 means no pulse, 1 means maximum pulse. This is useful for Representers that support find and replace.
| - (IBAction) selectAll: | (id) | sender |
Selects the entire contents.
| - (unsigned long long) minimumSelectionLocation |
Returns the smallest value in the selected contents ranges, or the insertion location if the selection is empty.
| - (unsigned long long) maximumSelectionLocation |
Returns the largest HFMaxRange of the selected contents ranges, or the insertion location if the selection is empty.
| - (HFByteArray *) byteArrayForSelectedContentsRanges |
Convenience method for creating a byte array containing all of the selected bytes. If the selection has length 0, this returns an empty byte array.
| - (void) maximizeVisibilityOfContentsRange: | (HFRange) | range |
Modify the displayedLineRange so that as much of the given range as can fit is visible. If possible, moves by as little as possible so that the visible ranges before and afterward intersect with each other.
| - (void) centerContentsRange: | (HFRange) | range |
Modify the displayedLineRange as to center the given contents range. If the range is near the bottom or top, this will center as close as possible. If contents range is too large to fit, it centers the top of the range. contentsRange may be empty.
| - (void) representer: | (HFRepresenter *) | rep | |
| changedProperties: | (HFControllerPropertyBits) | properties | |
Representer initiated property changes Called from a representer to indicate when some internal property of the representer has changed which requires that some properties be recalculated.
Callback for a representer-initiated change to some property. For example, if some property of a view changes that would cause the number of bytes per line to change, then the representer should call this method which will trigger the HFController to recompute the relevant properties.
| - (void) beginSelectionWithEvent: | (NSEvent *) | event | |
| forByteIndex: | (unsigned long long) | byteIndex | |
Begin a selection session, with a mouse down at the given byte index.
| - (void) continueSelectionWithEvent: | (NSEvent *) | event | |
| forByteIndex: | (unsigned long long) | byteIndex | |
Continue a selection session, whe the user drags over the given byte index.
| - (void) endSelectionWithEvent: | (NSEvent *) | event | |
| forByteIndex: | (unsigned long long) | byteIndex | |
End a selection session, with a mouse up at the given byte index.
| - (void) scrollWithScrollEvent: | (NSEvent *) | scrollEvent |
Trigger scrolling appropriate for the given scroll event.
| - (void) scrollByLines: | (long double) | lines |
Trigger scrolling by the given number of lines. If lines is positive, then the document is scrolled down; otherwise it is scrolled up.
| - (void) moveInDirection: | (HFControllerMovementDirection) | direction | |
| byByteCount: | (unsigned long long) | amountToMove | |
| withSelectionTransformation: | (HFControllerSelectionTransformation) | transformation | |
| usingAnchor: | (BOOL) | useAnchor | |
General purpose navigation function. Modify the selection in the given direction by the given number of bytes. The selection is modifed according to the given transformation. If useAnchor is set, then anchored selection is used; otherwise any anchor is discarded.
This has a few limitations:
| - (void) moveInDirection: | (HFControllerMovementDirection) | direction | |
| withGranularity: | (HFControllerMovementGranularity) | granularity | |
| andModifySelection: | (BOOL) | extendSelection | |
Navigation designed for key events.
| - (void) moveToLineBoundaryInDirection: | (HFControllerMovementDirection) | direction | |
| andModifySelection: | (BOOL) | extendSelection | |
| - (BOOL) insertByteArray: | (HFByteArray *) | byteArray | |
| replacingPreviousBytes: | (unsigned long long) | previousByteCount | |
| allowUndoCoalescing: | (BOOL) | allowUndoCoalescing | |
Replaces the selection with the given data. For something like a hex view representer, it takes two keypresses to create a whole byte; the way this is implemented, the first keypress goes into the data as a complete byte, and the second one (if any) replaces it. If previousByteCount > 0, then that many prior bytes are replaced, without breaking undo coalescing. For previousByteCount to be > 0, the following must be true: There is only one selected range, and it is of length 0, and its location >= previousByteCount
These functions return YES if they succeed, and NO if they fail. Currently they may fail only in overwrite mode, if you attempt to insert data that would require lengthening the byte array.
These methods are undoable.
| - (BOOL) insertData: | (NSData *) | data | |
| replacingPreviousBytes: | (unsigned long long) | previousByteCount | |
| allowUndoCoalescing: | (BOOL) | allowUndoCoalescing | |
| - (void) deleteSelection |
Deletes the selection. This operation is undoable.
| - (void) deleteDirection: | (HFControllerMovementDirection) | direction |
If the selection is empty, deletes one byte in a given direction, which must be HFControllerDirectionLeft or HFControllerDirectionRight; if the selection is not empty, deletes the selection. Undoable.
| - (NSData *) dataForRange: | (HFRange) | range |
| - (void) copyBytes: | (unsigned char *) | bytes | |
| range: | (HFRange) | range | |
Copies data within the given HFRange into an in-memory buffer. This is equivalent to [[controller byteArray] copyBytes:bytes range:range].
| - (HFByteRangeAttributeArray *) byteRangeAttributeArray |
Convenience method that returns the attributes of the underlying byte array. You can message it directly to add and remove attributes. If you do so, be sure to call representer:changedProperties: with the HFControllerByteRangeAttributes bit
| - (HFByteRangeAttributeArray *) attributesForBytesInRange: | (HFRange) | range |
Returns the attributes for the given range. This is a union of the receiver's byteRangeAttributeArray properties and the properties returned by the byte array itself. range.length must be <= NSUIntegerMax.
| - (HFRange) rangeForBookmark: | (NSInteger) | bookmark |
Returns the range for the given bookmark. If there is no bookmark, returns {ULLONG_MAX, ULLONG_MAX}.
| - (void) setRange: | (HFRange) | range | |
| forBookmark: | (NSInteger) | bookmark | |
Sets the range for the given bookmark. Pass {ULLONG_MAX, ULLONG_MAX} to remove the bookmark. Undoable.
| - (NSIndexSet *) bookmarksInRange: | (HFRange) | range |
Returns an NSIndexSet of the bookmarks in the given range.
| - (unsigned long long) contentsLength |
Returns total number of bytes. This is equivalent to [[controller byteArray] length].
| + (BOOL) prepareForChangeInFile: | (NSURL *) | targetFile | |
| fromWritingByteArray: | (HFByteArray *) | array | |
Attempts to clear all dependencies on the given file (clipboard, undo, etc.) that could not be preserved if the file were written. Returns YES if we successfully prepared, NO if someone objected. This works by posting a HFPrepareForChangeInFileNotification. HFController does not register for this notification: instead the owners of the HFController are expected to register for HFPrepareForChangeInFileNotification and react appropriately.
| - (BOOL) clearUndoManagerDependenciesOnRanges: | (NSArray *) | ranges | |
| inFile: | (HFFileReference *) | reference | |
| hint: | (NSMutableDictionary *) | hint | |
Attempts to break undo stack dependencies for writing the given file. If it is unable to do so, it will clear the controller's contributions to the stack. Returns YES if it successfully broke the dependencies, and NO if the stack had to be cleared.
|
protected |
|
readatomiccopy |
|
readwritenonatomicstrong |
The byte array must be non-nil. In general, HFRepresenters should not use this to determine what bytes to display. Instead they should use copyBytes:range: or dataForRange: below.
|
readwritenonatomiccopy |
An array of HFRangeWrappers, representing the selected ranges. It satisfies the following: The array is non-nil. There always is at least one selected range. If any range has length 0, that range is the only range. No range extends beyond the contentsLength, with the exception of a single zero-length range at the end.
When setting, the setter MUST obey the above criteria. A zero length range when setting or getting represents the cursor position.
|
readwritenonatomicassign |
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Get the current displayed line range. The displayed line range is an HFFPRange (range of long doubles) containing the lines that are currently displayed.
The values may be fractional. That is, if only the bottom half of line 4 through the top two thirds of line 8 is shown, then the displayedLineRange.location will be 4.5 and the displayedLineRange.length will be 3.17 ( = 7.67 - 4.5). Representers are expected to be able to handle such fractional values.
When setting the displayed line range, the given range must be nonnegative, and the maximum of the range must be no larger than the total line count.
|
readwritenonatomiccopy |
The current font.
|
readwritenonatomicstrong |
The undo manager. If no undo manager is set, then undo is not supported. By default the undo manager is nil.
|
readwritenonatomicassign |
Whether the user can edit the document.
|
readwritenonatomicassign |
Whether the text should be antialiased. Note that Mac OS X settings may prevent antialiasing text below a certain point size.
|
readwritenonatomicassign |
When enabled, characters have a background color that correlates to their byte values.
|
readwritenonatomicassign |
When enabled, byte bookmarks display callout-style labels attached to them.
|
readwritenonatomicassign |
When enabled, null bytes are hidden in the hex view.
|
readwritenonatomicassign |
When enabled, unmodified documents are auto refreshed to their latest on disk state.


|
CryptoAuthLib
Atmel CryptoAuthentication Library
|
These methods provide the most convenient, simple API to CryptoAuth chips. More...
Macros | |
| #define | atcab_bin2hex |
Functions | |
| ATCA_STATUS | atcab_version (char *verstr) |
| returns a version string for the CryptoAuthLib release. The format of the version string returned is "yyyymmdd" More... | |
| ATCA_STATUS | atcab_init (ATCAIfaceCfg *cfg) |
| atcab_init is called once for the life of the application and creates a global ATCADevice object used by Basic API. This method builds a global ATCADevice instance behinds the scenes that's used for all Basic API operations More... | |
| ATCA_STATUS | atcab_init_device (ATCADevice cadevice) |
| atcab_init_device can be used to initialize the global ATCADevice object to point to one of your choosing for use with all the atcab_ basic API. More... | |
| ATCA_STATUS | atcab_release (void) |
| release (free) the global ATCADevice instance. This must be called in order to release or free up the interface. More... | |
| ATCADevice | atcab_getDevice (void) |
| a way to get the global device object. Generally for more sophisticated users of atca More... | |
| ATCA_STATUS | atcab_wakeup (void) |
| wakeup the CryptoAuth device More... | |
| ATCA_STATUS | atcab_idle (void) |
| idle the CryptoAuth device More... | |
| ATCA_STATUS | atcab_sleep (void) |
| invoke sleep on the CryptoAuth device More... | |
| ATCA_STATUS | atcab_cfg_discover (ATCAIfaceCfg cfgArray[], int max) |
| ATCA_STATUS | atcab_info (uint8_t *revision) |
| get the device revision information More... | |
| ATCA_STATUS | atcab_challenge (const uint8_t *challenge) |
| send a challenge to the device (a pass-through nonce) More... | |
| ATCA_STATUS | atcab_challenge_seed_update (const uint8_t *seed, uint8_t *rand_out) |
| send a challenge to the device (a seed update nonce) More... | |
| ATCA_STATUS | atcab_nonce (const uint8_t *tempkey) |
| Execute a pass-through Nonce command to initialize TempKey to the specified value. More... | |
| ATCA_STATUS | atcab_nonce_rand (const uint8_t *seed, uint8_t *rand_out) |
| Initialize TempKey with a random Nonce. More... | |
| ATCA_STATUS | atcab_random (uint8_t *rand_out) |
| Get a 32 byte random number from the CryptoAuth device. More... | |
| ATCA_STATUS | atcab_is_locked (uint8_t zone, bool *lock_state) |
| Query to see if the specified zone is locked. More... | |
| ATCA_STATUS | atcab_is_slot_locked (uint8_t slot, bool *lock_state) |
| Query to see if the specified slot is locked. More... | |
| ATCA_STATUS | atcab_get_addr (uint8_t zone, uint8_t slot, uint8_t block, uint8_t offset, uint16_t *addr) |
| Compute the address given the zone, slot, block, and offset. More... | |
| ATCA_STATUS | atcab_read_zone (uint8_t zone, uint8_t slot, uint8_t block, uint8_t offset, uint8_t *data, uint8_t len) |
| read either 4 or 32 bytes of data into given slot More... | |
| ATCA_STATUS | atcab_write_zone (uint8_t zone, uint8_t slot, uint8_t block, uint8_t offset, const uint8_t *data, uint8_t len) |
| Write either 4 or 32 bytes of data into a device zone. More... | |
| ATCA_STATUS | atcab_write_bytes_slot (uint8_t slot, uint16_t offset, const uint8_t *data, uint8_t len) |
| write data into given slot of data zone with offset address More... | |
| ATCA_STATUS | atcab_write_bytes_zone (ATCADeviceType dev_type, uint8_t zone, uint16_t address, const uint8_t *data, uint8_t len) |
| write data into config, otp or data zone with given zone and offset More... | |
| ATCA_STATUS | atcab_read_bytes_zone (ATCADeviceType dev_type, uint8_t zone, uint16_t address, uint8_t len, uint8_t *data) |
| read data from config, otp or data zone with given zone, offset and len More... | |
| ATCA_STATUS | atcab_read_serial_number (uint8_t *serial_number) |
| read the serial number of the device More... | |
| ATCA_STATUS | atcab_read_pubkey (uint8_t slot8toF, uint8_t *pubkey) |
| reads a pub key from a readable data slot versus atcab_get_pubkey which generates a pubkey from a private key slot More... | |
| ATCA_STATUS | atcab_write_pubkey (uint8_t slot8toF, uint8_t *pubkey) |
| Writes a pub key from to a data slot. More... | |
| ATCA_STATUS | atcab_read_sig (uint8_t slot8toF, uint8_t *sig) |
| reads a signature found in one of slots 8 through F. More... | |
| ATCA_STATUS | atcab_read_ecc_config_zone (uint8_t *config_data) |
| read the config zone by block by block for 32 byte read, offset is ignored data receives the contents read from the slot Config zone can be read regardless of it being locked or unlocked More... | |
| ATCA_STATUS | atcab_write_ecc_config_zone (const uint8_t *config_data) |
| given an ECC configuration zone buffer, write its parts to the device's config zone More... | |
| ATCA_STATUS | atcab_read_sha_config_zone (uint8_t *config_data) |
| given an SHA configuration zone buffer, read its parts from the device's config zone More... | |
| ATCA_STATUS | atcab_write_sha_config_zone (const uint8_t *config_data) |
| given an SHA configuration zone buffer, write its parts to the device's config zone More... | |
| ATCA_STATUS | atcab_read_config_zone (ATCADeviceType dev_type, uint8_t *config_data) |
| given an SHA configuration zone buffer and dev type, read its parts from the device's config zone More... | |
| ATCA_STATUS | atcab_write_config_zone (ATCADeviceType dev_type, const uint8_t *config_data) |
| given an SHA configuration zone buffer and dev type, write its parts to the device's config zone More... | |
| ATCA_STATUS | atcab_cmp_config_zone (uint8_t *config_data, bool *same_config) |
| This function compares all writable bytes in the configuration zone that is passed in to the bytes on the device. More... | |
| ATCA_STATUS | atcab_read_enc (uint8_t slotid, uint8_t block, uint8_t *data, const uint8_t *enckey, const uint16_t enckeyid) |
| Read 32 bytes of data from the given slot. The function returns clear text bytes. Encrypted bytes are read over the wire, then subsequently decrypted Data zone must be locked and the slot configuration must be set to encrypted read for the block to be successfully read. More... | |
| ATCA_STATUS | atcab_write_enc (uint8_t slotid, uint8_t block, const uint8_t *data, const uint8_t *enckey, const uint16_t enckeyid) |
| Write 32 bytes of data into given slot. The function takes clear text bytes, but encrypts them for writing over the wire Data zone must be locked and the slot configuration must be set to encrypted write for the block to be successfully written. More... | |
| ATCA_STATUS | atcab_lock_config_zone (uint8_t *lock_response) |
| lock the ATCA ECC config zone. config zone must be unlocked for the zone to be successfully locked More... | |
| ATCA_STATUS | atcab_lock_data_zone (uint8_t *lock_response) |
| lock the ATCA ECC Data zone. More... | |
| ATCA_STATUS | atcab_lock_data_slot (uint8_t slot, uint8_t *lock_response) |
| lock the ATCA ECC Data Slot ConfigZone must be locked and DataZone may or may not be locked for a individual data slot to be locked More... | |
| ATCA_STATUS | atcab_priv_write (uint8_t slot, const uint8_t priv_key[36], uint8_t write_key_slot, const uint8_t write_key[32]) |
| write a P256 private key in given slot using mac computation More... | |
| ATCA_STATUS | atcab_genkey (int slot, uint8_t *pubkey) |
| generate a key on given slot More... | |
| ATCA_STATUS | atcab_get_pubkey (uint8_t privSlotId, uint8_t *pubkey) |
| returns a public key found in a designated slot. The slot must be configured as a slot with a private key. This method will use GenKey t geenrate the corresponding public key from the private key in the given slot. More... | |
| ATCA_STATUS | atcab_calc_pubkey (uint8_t privSlotId, uint8_t *pubkey) |
| returns a public key found in a designated slot. The slot must be configured as a slot with a private key. This method will use GenKey t geenrate the corresponding public key from the private key in the given slot. More... | |
| ATCA_STATUS | atcab_sign (uint16_t slot, const uint8_t *msg, uint8_t *signature) |
| sign a buffer using private key in given slot, stuff the signature More... | |
| ATCA_STATUS | atcab_verify_extern (const uint8_t *message, const uint8_t *signature, const uint8_t *pubkey, bool *verified) |
| verify a signature using CryptoAuth hardware (as opposed to an ECDSA software implementation) More... | |
| ATCA_STATUS | atcab_ecdh (uint16_t key_id, const uint8_t *pub_key, uint8_t *ret_ecdh) |
| issues ecdh command More... | |
| ATCA_STATUS | atcab_ecdh_enc (uint16_t slotid, const uint8_t *pubkey, uint8_t *ret_ecdh, const uint8_t *enckey, const uint8_t enckeyid) |
| issues ecdh command More... | |
| ATCA_STATUS | atcab_gendig (uint8_t zone, uint16_t key_id) |
| Issues a GenDig command to SHA256 hash the source data indicated by zone with the contents of TempKey. See the CryptoAuth datasheet for your chip to see what the values of zone correspond to. More... | |
| ATCA_STATUS | atcab_gendig_host (uint8_t zone, uint16_t key_id, uint8_t *other_data, uint8_t len) |
| Similar to atcab_gendig except this method does the operation in software on the host. More... | |
| ATCA_STATUS | atcab_mac (uint8_t mode, uint16_t key_id, const uint8_t *challenge, uint8_t *digest) |
| Get a 32 byte MAC from the CryptoAuth device given a key ID and a challenge. More... | |
| ATCA_STATUS | atcab_checkmac (uint8_t mode, uint16_t key_id, const uint8_t *challenge, const uint8_t *response, const uint8_t *other_data) |
| Compares a MAC response with input values. More... | |
| ATCA_STATUS | atcab_sha_start (void) |
| Initialize SHA-256 calculation engine. More... | |
| ATCA_STATUS | atcab_sha_update (uint16_t length, const uint8_t *message) |
| Adds the message to be digested. More... | |
| ATCA_STATUS | atcab_sha_end (uint8_t *digest, uint16_t length, const uint8_t *message) |
| The SHA-256 calculation is complete. More... | |
| ATCA_STATUS | atcab_sha (uint16_t length, const uint8_t *message, uint8_t *digest) |
| Computes a SHA-256 digest. More... | |
| ATCA_STATUS | packHex (const char *asciiHex, int asciiHexLen, char *packedHex, int *packedLen) |
| bool | isDigit (char c) |
| Checks to see if a character is an ASCII representation of a digit ((c ge '0') and (c le '9')) More... | |
| bool | isWhiteSpace (char c) |
| Checks to see if a character is whitespace ((c == ' ') || (c == '') || (c == '') || (c == ' ')) More... | |
| bool | isHexAlpha (char c) |
| Checks to see if a character is an ASCII representation of hex ((c ge 'A') and (c le 'F')) || ((c ge 'a') and (c le 'f')) More... | |
| bool | isHex (char c) |
| Returns true if this character is a valid hex character or if this is whitespace (The character can be included in a valid hexstring). More... | |
| bool | isHexDigit (char c) |
| Returns true if this character is a valid hex character. More... | |
These methods provide the most convenient, simple API to CryptoAuth chips.
| #define atcab_bin2hex |
| ATCA_STATUS atcab_calc_pubkey | ( | uint8_t | privSlotId, |
| uint8_t * | pubkey | ||
| ) |
returns a public key found in a designated slot. The slot must be configured as a slot with a private key. This method will use GenKey t geenrate the corresponding public key from the private key in the given slot.
| [in] | privSlotId | ID of the private key slot |
| [out] | pubkey | - pointer to space receiving the contents of the public key that was generated |
| ATCA_STATUS atcab_cfg_discover | ( | ATCAIfaceCfg | cfgArray[], |
| int | max | ||
| ) |
| ATCA_STATUS atcab_challenge | ( | const uint8_t * | challenge | ) |
send a challenge to the device (a pass-through nonce)
| [in] | challenge | - pointer to 32 bytes of data which will be sent as the challenge |
| ATCA_STATUS atcab_challenge_seed_update | ( | const uint8_t * | seed, |
| uint8_t * | rand_out | ||
| ) |
send a challenge to the device (a seed update nonce)
| [in] | seed | - pointer to 32 bytes of data which will be sent as the challenge |
| [out] | rand_out | - points to space to receive random number |
| ATCA_STATUS atcab_checkmac | ( | uint8_t | mode, |
| uint16_t | key_id, | ||
| const uint8_t * | challenge, | ||
| const uint8_t * | response, | ||
| const uint8_t * | other_data | ||
| ) |
Compares a MAC response with input values.
| [in] | mode | Controls which fields within the device are used in the message |
| [in] | key_id | The key in the CryptoAuth device to use for the MAC |
| [in] | challenge | The 32 byte challenge number |
| [in] | response | The 32 byte mac response number |
| [in] | other_data | The 13 byte other data number |
| ATCA_STATUS atcab_cmp_config_zone | ( | uint8_t * | config_data, |
| bool * | same_config | ||
| ) |
This function compares all writable bytes in the configuration zone that is passed in to the bytes on the device.
| [in] | config_data | pointer to all 128 bytes in configuration zone. Not used if NULL. |
| [out] | same_config | pointer to boolean status whether config data passed in matches the actual config zone |
| ATCA_STATUS atcab_ecdh | ( | uint16_t | key_id, |
| const uint8_t * | pubkey, | ||
| uint8_t * | ret_ecdh | ||
| ) |
issues ecdh command
| [in] | key_id | slot of key for ECDH computation |
| [in] | pubkey | public key |
| [out] | ret_ecdh | - computed ECDH key - A buffer with size of ATCA_KEY_SIZE |
| ATCA_STATUS atcab_ecdh_enc | ( | uint16_t | slotid, |
| const uint8_t * | pubkey, | ||
| uint8_t * | ret_ecdh, | ||
| const uint8_t * | enckey, | ||
| const uint8_t | enckeyid | ||
| ) |
issues ecdh command
| [in] | slotid | slot of key for ECDH computation |
| [in] | pubkey | public key |
| [out] | ret_ecdh | - computed ECDH key - A buffer with size of ATCA_KEY_SIZE |
| ATCA_STATUS atcab_gendig | ( | uint8_t | zone, |
| uint16_t | key_id | ||
| ) |
Issues a GenDig command to SHA256 hash the source data indicated by zone with the contents of TempKey. See the CryptoAuth datasheet for your chip to see what the values of zone correspond to.
| [in] | zone | - designates the source of the data to hash with TempKey |
| [in] | key_id | - indicates the key, OTP block or message order for shared nonce mode |
| ATCA_STATUS atcab_gendig_host | ( | uint8_t | zone, |
| uint16_t | key_id, | ||
| uint8_t * | other_data, | ||
| uint8_t | len | ||
| ) |
Similar to atcab_gendig except this method does the operation in software on the host.
| [in] | zone | - designates the source of the data to hash with TempKey |
| [in] | key_id | - indicates the key, OTP block or message order for shared nonce mode |
| [in] | other_data | - pointer to 4 or 32 bytes of data depending upon the mode |
| [in] | len | - length of data |
| ATCA_STATUS atcab_genkey | ( | int | slot, |
| uint8_t * | pubkey | ||
| ) |
generate a key on given slot
| [in] | slot | slot number where ECC key is configured |
| [out] | pubkey | 64 bytes of returned public key for given slot |
| ATCA_STATUS atcab_get_addr | ( | uint8_t | zone, |
| uint8_t | slot, | ||
| uint8_t | block, | ||
| uint8_t | offset, | ||
| uint16_t * | addr | ||
| ) |
Compute the address given the zone, slot, block, and offset.
| [in] | zone | |
| [in] | slot | |
| [in] | block | |
| [in] | offset | |
| [in] | addr |
| ATCA_STATUS atcab_get_pubkey | ( | uint8_t | privSlotId, |
| uint8_t * | pubkey | ||
| ) |
returns a public key found in a designated slot. The slot must be configured as a slot with a private key. This method will use GenKey t geenrate the corresponding public key from the private key in the given slot.
| [in] | privSlotId | ID of the private key slot |
| [out] | pubkey | - pointer to space receiving the contents of the public key that was generated |
| ATCADevice atcab_getDevice | ( | void | ) |
a way to get the global device object. Generally for more sophisticated users of atca
| ATCA_STATUS atcab_idle | ( | void | ) |
idle the CryptoAuth device
| ATCA_STATUS atcab_info | ( | uint8_t * | revision | ) |
get the device revision information
| [out] | revision | - 4-byte storage for receiving the revision number from the device |
| ATCA_STATUS atcab_init | ( | ATCAIfaceCfg * | cfg | ) |
atcab_init is called once for the life of the application and creates a global ATCADevice object used by Basic API. This method builds a global ATCADevice instance behinds the scenes that's used for all Basic API operations
| [in] | cfg | is a pointer to an interface configuration. This is usually a predefined configuration found in atca_cfgs.h |
| ATCA_STATUS atcab_init_device | ( | ATCADevice | cadevice | ) |
atcab_init_device can be used to initialize the global ATCADevice object to point to one of your choosing for use with all the atcab_ basic API.
| [in] | cadevice | ATCADevice instance to use as the global Basic API crypto device instance |
| ATCA_STATUS atcab_is_locked | ( | uint8_t | zone, |
| bool * | islocked | ||
| ) |
Query to see if the specified zone is locked.
| [in] | zone | The zone to query for locked (use LOCK_ZONE_CONFIG or LOCK_ZONE_DATA) |
| [out] | islocked | true if the specified zone is locked |
| ATCA_STATUS atcab_is_slot_locked | ( | uint8_t | slot, |
| bool * | islocked | ||
| ) |
Query to see if the specified slot is locked.
| [in] | slot | The slot to query for locked (slot 0-15) |
| [out] | islocked | true if the specified slot is locked |
| ATCA_STATUS atcab_lock_config_zone | ( | uint8_t * | lock_response | ) |
lock the ATCA ECC config zone. config zone must be unlocked for the zone to be successfully locked
| [in] | lock_response |
| ATCA_STATUS atcab_lock_data_slot | ( | uint8_t | slot, |
| uint8_t * | lock_response | ||
| ) |
lock the ATCA ECC Data Slot ConfigZone must be locked and DataZone may or may not be locked for a individual data slot to be locked
| [in] | slot | to be locked in data zone |
| [in] | lock_response | pointer to the lock response from the chip - 0 is successful lock |
| ATCA_STATUS atcab_lock_data_zone | ( | uint8_t * | lock_response | ) |
lock the ATCA ECC Data zone.
ConfigZone must be locked and DataZone must be unlocked for the zone to be successfully locked
| [in] | lock_response |
| ATCA_STATUS atcab_mac | ( | uint8_t | mode, |
| uint16_t | key_id, | ||
| const uint8_t * | challenge, | ||
| uint8_t * | digest | ||
| ) |
Get a 32 byte MAC from the CryptoAuth device given a key ID and a challenge.
| [in] | mode | Controls which fields within the device are used in the message |
| [in] | key_id | The key in the CryptoAuth device to use for the MAC |
| [in] | challenge | The 32 byte challenge number |
| [out] | digest | The response of the MAC command using the given challenge |
| ATCA_STATUS atcab_nonce | ( | const uint8_t * | tempkey | ) |
Execute a pass-through Nonce command to initialize TempKey to the specified value.
| [in] | tempkey | - pointer to 32 bytes of data which will be used to initialize TempKey |
| ATCA_STATUS atcab_nonce_rand | ( | const uint8_t * | seed, |
| uint8_t * | rand_out | ||
| ) |
Initialize TempKey with a random Nonce.
| [in] | seed | - pointer to 20 bytes of data which will be used to calculate TempKey |
| [out] | rand_out | - pointer to 32 bytes of data that is the output of the Nonce command |
| ATCA_STATUS atcab_priv_write | ( | uint8_t | slot, |
| const uint8_t | priv_key[36], | ||
| uint8_t | write_key_slot, | ||
| const uint8_t | write_key[32] | ||
| ) |
write a P256 private key in given slot using mac computation
| [in] | slot | |
| [in] | priv_key | first 4 bytes of 36 bytes should be zero |
| [in] | write_key_slot | slot to make a session key |
| [in] | write_key | key to make a session key |
| ATCA_STATUS atcab_random | ( | uint8_t * | rand_out | ) |
Get a 32 byte random number from the CryptoAuth device.
| [out] | rand_out | ptr to 32 bytes of storage for random number |
| ATCA_STATUS atcab_read_bytes_zone | ( | ATCADeviceType | dev_type, |
| uint8_t | zone, | ||
| uint16_t | address, | ||
| uint8_t | len, | ||
| uint8_t * | data | ||
| ) |
read data from config, otp or data zone with given zone, offset and len
| [in] | dev_type | to identify device |
| [in] | zone | to write data |
| [in] | address | of pointed zone |
| [in] | len | length to be read |
| [out] | data | buffer to be read data |
| ATCA_STATUS atcab_read_config_zone | ( | ATCADeviceType | dev_type, |
| uint8_t * | config_data | ||
| ) |
given an SHA configuration zone buffer and dev type, read its parts from the device's config zone
| [in] | dev_type | device type |
| [out] | config_data | pointer to buffer containing a contiguous set of bytes to write to the config zone |
| ATCA_STATUS atcab_read_ecc_config_zone | ( | uint8_t * | config_data | ) |
read the config zone by block by block for 32 byte read, offset is ignored data receives the contents read from the slot Config zone can be read regardless of it being locked or unlocked
| [in] | config_data | pointer to buffer containing a contiguous set of bytes to read from the config zone returns ATCA_STATUS |
| ATCA_STATUS atcab_read_enc | ( | uint8_t | slotid, |
| uint8_t | block, | ||
| uint8_t * | data, | ||
| const uint8_t * | enckey, | ||
| const uint16_t | enckeyid | ||
| ) |
Read 32 bytes of data from the given slot. The function returns clear text bytes. Encrypted bytes are read over the wire, then subsequently decrypted Data zone must be locked and the slot configuration must be set to encrypted read for the block to be successfully read.
| [in] | slotid | The slot id for the encrypted read |
| [in] | block | The block id in the specified slot |
| [out] | data | The 32 bytes of clear text data that was read encrypted from the slot, then decrypted |
| [in] | enckey | The key to encrypt with for writing |
| [in] | enckeyid | The keyid of the parent encryption key returns ATCA_STATUS |
| ATCA_STATUS atcab_read_pubkey | ( | uint8_t | slot8toF, |
| uint8_t * | pubkey | ||
| ) |
reads a pub key from a readable data slot versus atcab_get_pubkey which generates a pubkey from a private key slot
| [in] | slot8toF | - slot number to read, expected value is 0x8 through 0xF |
| [out] | pubkey | - space to receive read pubkey |
| ATCA_STATUS atcab_read_serial_number | ( | uint8_t * | serial_number | ) |
read the serial number of the device
| [out] | serial_number | pointer to space to receive serial number. This space should be 9 bytes long |
| ATCA_STATUS atcab_read_sha_config_zone | ( | uint8_t * | config_data | ) |
given an SHA configuration zone buffer, read its parts from the device's config zone
| [out] | config_data | pointer to buffer containing a contiguous set of bytes to write to the config zone |
| ATCA_STATUS atcab_read_sig | ( | uint8_t | slot8toF, |
| uint8_t * | sig | ||
| ) |
reads a signature found in one of slots 8 through F.
| [in] | slot8toF | - which slot to read |
| [out] | sig | - pointer to the space to receive the signature found in the slot |
| ATCA_STATUS atcab_read_zone | ( | uint8_t | zone, |
| uint8_t | slot, | ||
| uint8_t | block, | ||
| uint8_t | offset, | ||
| uint8_t * | data, | ||
| uint8_t | len | ||
| ) |
read either 4 or 32 bytes of data into given slot
for 32 byte read, offset is ignored data receives the contents read from the slot
data zone must be locked and the slot configuration must not be secret for a slot to be successfully read
| [in] | zone | |
| [in] | slot | |
| [in] | block | |
| [in] | offset | |
| [in] | data | |
| [in] | len | Must be either 4 or 32 returns ATCA_STATUS |
| ATCA_STATUS atcab_release | ( | void | ) |
release (free) the global ATCADevice instance. This must be called in order to release or free up the interface.
| ATCA_STATUS atcab_sha | ( | uint16_t | length, |
| const uint8_t * | message, | ||
| uint8_t * | digest | ||
| ) |
Computes a SHA-256 digest.
| [in] | length | The number of bytes in the message parameter |
| [in] | message | - pointer to variable length message |
| [out] | digest | The SHA256 digest |
| ATCA_STATUS atcab_sha_end | ( | uint8_t * | digest, |
| uint16_t | length, | ||
| const uint8_t * | message | ||
| ) |
The SHA-256 calculation is complete.
| [out] | digest | The SHA256 digest that is calculated |
| ATCA_STATUS atcab_sha_start | ( | void | ) |
Initialize SHA-256 calculation engine.
| ATCA_STATUS atcab_sha_update | ( | uint16_t | length, |
| const uint8_t * | message | ||
| ) |
Adds the message to be digested.
| [in] | length | The number of bytes in the Message parameter |
| [in] | message | up to 64 bytes of data to be included into the hash operation. |
| ATCA_STATUS atcab_sign | ( | uint16_t | slot, |
| const uint8_t * | msg, | ||
| uint8_t * | signature | ||
| ) |
sign a buffer using private key in given slot, stuff the signature
| [in] | slot | |
| [in] | msg | should point to a 32 byte buffer |
| [out] | signature | of msg. signature should point to buffer SIGN_RSP_SIZE big |
| ATCA_STATUS atcab_sleep | ( | void | ) |
invoke sleep on the CryptoAuth device
| ATCA_STATUS atcab_verify_extern | ( | const uint8_t * | message, |
| const uint8_t * | signature, | ||
| const uint8_t * | pubkey, | ||
| bool * | verified | ||
| ) |
verify a signature using CryptoAuth hardware (as opposed to an ECDSA software implementation)
| [in] | message | pointer |
| [in] | signature | pointer |
| [in] | pubkey | pointer |
| [out] | verified | boolean whether or not the challenge/signature/pubkey verified |
| ATCA_STATUS atcab_version | ( | char * | verstr | ) |
returns a version string for the CryptoAuthLib release. The format of the version string returned is "yyyymmdd"
| [out] | verstr | ptr to space to receive version string |
| ATCA_STATUS atcab_wakeup | ( | void | ) |
wakeup the CryptoAuth device
| ATCA_STATUS atcab_write_bytes_slot | ( | uint8_t | slot, |
| uint16_t | offset, | ||
| const uint8_t * | data, | ||
| uint8_t | len | ||
| ) |
write data into given slot of data zone with offset address
| [in] | slot | to write data |
| [in] | offset | of pointed slot |
| [in] | data | pointer to write data |
| [in] | data | length corresponding to data |
| ATCA_STATUS atcab_write_bytes_zone | ( | ATCADeviceType | dev_type, |
| uint8_t | zone, | ||
| uint16_t | address, | ||
| const uint8_t * | data, | ||
| uint8_t | len | ||
| ) |
write data into config, otp or data zone with given zone and offset
| [in] | dev_type | to identify device |
| [in] | zone | to write data |
| [in] | address | to pointed zone |
| [in] | data | pointer of to write data |
| [in] | len | data length corresponding to data |
| ATCA_STATUS atcab_write_config_zone | ( | ATCADeviceType | dev_type, |
| const uint8_t * | config_data | ||
| ) |
given an SHA configuration zone buffer and dev type, write its parts to the device's config zone
| [in] | config_data | pointer to buffer containing a contiguous set of bytes to write to the config zone |
| ATCA_STATUS atcab_write_ecc_config_zone | ( | const uint8_t * | config_data | ) |
given an ECC configuration zone buffer, write its parts to the device's config zone
| [in] | config_data | pointer to buffer containing a contiguous set of bytes to write to the config zone |
| ATCA_STATUS atcab_write_enc | ( | uint8_t | slotid, |
| uint8_t | block, | ||
| const uint8_t * | data, | ||
| const uint8_t * | enckey, | ||
| const uint16_t | enckeyid | ||
| ) |
Write 32 bytes of data into given slot. The function takes clear text bytes, but encrypts them for writing over the wire Data zone must be locked and the slot configuration must be set to encrypted write for the block to be successfully written.
| [in] | slotid | |
| [in] | block | |
| [in] | data | The 32 bytes of clear text data to be written to the slot |
| [in] | enckey | The key to encrypt with for writing |
| [in] | enckeyid | The keyid of the parent encryption key returns ATCA_STATUS |
| ATCA_STATUS atcab_write_pubkey | ( | uint8_t | slot8toF, |
| uint8_t * | pubkey | ||
| ) |
Writes a pub key from to a data slot.
| [in] | slot8toF | Slot number to write, expected value is 0x8 through 0xF |
| [out] | pubkey | The public key to write into the slot specified |
| ATCA_STATUS atcab_write_sha_config_zone | ( | const uint8_t * | config_data | ) |
given an SHA configuration zone buffer, write its parts to the device's config zone
| [in] | config_data | pointer to buffer containing a contiguous set of bytes to write to the config zone |
| ATCA_STATUS atcab_write_zone | ( | uint8_t | zone, |
| uint8_t | slot, | ||
| uint8_t | block, | ||
| uint8_t | offset, | ||
| const uint8_t * | data, | ||
| uint8_t | len | ||
| ) |
Write either 4 or 32 bytes of data into a device zone.
See ECC108A datasheet, datazone address values, table 9-8
| [in] | zone | Device zone to write to (0=config, 1=OTP, 2=data). |
| [in] | slot | If writing to the data zone, whit is the slot to write to, otherwise it should be 0. |
| [in] | block | 32-byte block to write to. |
| [in] | offset | 4-byte word within the specified block to write to. If performing a 32-byte write, this should be 0. |
| [in] | data | Data to be written. |
| [in] | len | Number of bytes to be written. Must be either 4 or 32. |
| bool isDigit | ( | char | c | ) |
Checks to see if a character is an ASCII representation of a digit ((c ge '0') and (c le '9'))
| [in] | c | character to check |
| bool isHex | ( | char | c | ) |
Returns true if this character is a valid hex character or if this is whitespace (The character can be included in a valid hexstring).
| [in] | c | character to check |
| bool isHexAlpha | ( | char | c | ) |
Checks to see if a character is an ASCII representation of hex ((c ge 'A') and (c le 'F')) || ((c ge 'a') and (c le 'f'))
| [in] | c | character to check |
| bool isHexDigit | ( | char | c | ) |
Returns true if this character is a valid hex character.
| [in] | c | character to check |
| bool isWhiteSpace | ( | char | c | ) |
Checks to see if a character is whitespace ((c == '
') || (c == '') || (c == '') || (c == ' '))
| [in] | c | character to check |
| ATCA_STATUS packHex | ( | const char * | asciiHex, |
| int | asciiHexLen, | ||
| char * | packedHex, | ||
| int * | packedLen | ||
| ) |


---
layout: post
title: ethandesu wedding options ring jacket
date: '2011-05-10T12:19:02+02:00'
tags:
- style
tumblr_url: http://dotmr.tumblr.com/post/5362869984/ethandesu-wedding-options-ring-jacket
---
Wedding Options
Ring Jacket Wool/Mohair, Ring Jacket Cotton, Drakes Silk.
Like: Color / Texture combinations


|title|igDialog|title|
|styles|
|styles|
|content|
TRY IT OUT:
- Drag the dialog around the page by the header
- Close the dialog and refresh the page to see it reappear
This sample demonstrates how to declare an igDialog with an AngularJS directive.
Explore the Code
|content|
|scripts|
|scripts|


Inside of a header - let's add a navbar with some essential links
Here is the main page - it consists of new articles
Article 1 - 1995 was a pretty crazy year for programming languages!
Don't believe me? Just check thid table out
| Language |
Designed by |
First Appeared |
| C++ |
Bjarne Stroustrup |
1983 |
| Python |
Guido van Rossum |
1991 |
| Ruby |
Yukihiro Matsumoto ("Matz") |
1995 |
| JavaScript |
Brendan Eich |
1995 |
| Java |
James Gosling |
1995 |
| PHP |
Rasmus Lerdorf |
1995 |
Article 2 - Coming soon...
Contact us!
General Information


Gateway
BOT
25-Jan-19 10:39 PM
[dscrd-cz] <jellysmash> hi there good people
[dscrd-cz] <jellysmash> what exchange(s) is Chainzilla trading on?
[dscrd-cz] <PTYX> @Hungry_BullBear in digitalprice there are people trading but we haven't announced it as official yet. the coins in there were mostly deposited during the testing period. After the ICO we will give the go ahead on the exchanges we will be available.
[dscrd-cz] <PTYX> The cryptopia hack was a blessing. We were going to be listed there
(edited)
[dscrd-cz] <PTYX> Im glad it happened before the ico.
[dscrd-cz] <Hungry_BullBear> aa sorry
[dscrd-cz] <PTYX> @Hungry_BullBear did you want to test chameleon?
[dscrd-cz] <Hungry_BullBear> Dont have time really - I am swarmed on my day job
[dscrd-cz] <PTYX> No problem, just wondering.
[dscrd-cz] <Hungry_BullBear> would like to test but really dont have the energy and time for it
[dscrd-cz] <PTYX> You'll get to use it soon enough anyway as the official ChainZilla wallet
[dscrd-cz] <Hungry_BullBear> Hope so
[dscrd-cz] <PTYX> This iteration implemented Agama seeds. So anyone with an agama wallet can use it. I'm very happy with the progress.
[dscrd-cz] <Hungry_BullBear> Are all tokens on-boarded by you gona be available in Chameleon ?
[dscrd-cz] <PTYX> This version is much smoother than the last one.
[dscrd-cz] <PTYX> @Hungry_BullBear yes, it's built into our pricing.
[dscrd-cz] <Hungry_BullBear> Nice
[dscrd-cz] <PTYX> The client has a choice of a whitelabel or managed wallet
[dscrd-cz] <Hungry_BullBear> what protections will the Chameleon wallet have (concerning phone hacks and malicious attacks) ?
[dscrd-cz] <PTYX> once we have the official release, we will begin the security audits as we are applying for PCI DSS
[dscrd-cz] <PTYX> We aren't going to get stifled with it at the moment since all the frameworks we are using are open source. However, when the release version is ready, security is number 1 priority. In the coming month we will announce the news about what features will be coming to Chameleon and why we will pursue the PCI DSS compliance.


{% include 'head.html' { page: "index" }%}
Exun, the computer club at Delhi Public School, R.K. Puram, stands for Experts Unlimited.
The club hosts an annual interschool symposium, also called Exun. As Creative Head for 2015-16, I was responsible for designing a coherent identity for the event.
Having represented the school in various computing symposia in India and around the world, the club also hosts the Delhi Public School R.K. Puram annual computer symposium “Exun”. Fifteen such symposiums have taken place and have been a grand success.In 2016, Exun held its 21st Annual Symposium.


--- title: Interests page online date: 2003-07-12T12:00:00.000Z ---
Interests page is now online, but is not yet finished. Most recent and best of all time PC games are up, as are all Strategy games. Simulation, Evil / Criminal, and Racing games will be up as soon as possible. Stay tuned!


New work in Ptolemy 0.7.2
- The Adaptive Computing Systems (ACS) Domain -
Eric Pauer, John Smith, James Lundblad
- The ACS domain uses different styles of stars than the rest of
Ptolemy. ACS splits a star into a single interface (called a Corona),
and one or more implementations, called Cores.
See the ACS Documentation for more information.
- Windows NT Port -
Christopher Hylands
- Ptolemy 0.7.2 runs under Windows NT using the
Cygwin32 compiler and the Cygwin32 X11R6 binaries. To run
pigi
under NT, you will need a NT X server.
For more information, see the
Ptolemy under Windows NT
page.
Up to: What's New in Ptolemy 0.7.2 -
Forward to: New Stars and Demos
Copyright © 1999, The Regents of the University of California.
All rights reserved.
Last updated 09/09/99,
comments to ptolemy@ptolemy.eecs.berkeley.edu.


@@include('../components/_head-liveguide.html')
@@include('../components/header.html')
Base Styles, Style Guide, & Pattern Library
@@include('../components/base-styles.html')
@@include('../components/style-guide.html')
@@include('../components/pattern-library.html')
@@include('../components/footer.html')


Updated in real time.
We wish to advise customers that due to anti social behaviour route 13 will not serve Balbutcher lane for the rest of the night.
We apologise for any inconvenience caused.On the morning of Sunday 1 December 2019, Dublin Bus in partnership with Transport For Ireland, will introduce a new 24-hour bus service on routes 15 and 41.
See dublinbus.ie for more info.We wish to advise customers of a revised timetable on route 747. A winter timetable will be operation from Monday the 2nd of December. The buses will operate every 15 minutes Monday to Saturday. There will be no change to Sunday times.
We apologise for any inconvenience caused.


--- title: NHS North Lincolnshire layout: gb ---
| Resource | Fetch | Format | Columns | Data | Valid | Entries | Oldest | Latest | Total (GBP) | |
|---|---|---|---|---|---|---|---|---|---|---|
| Spend over £25,000 in NHS North Lincolnshire | ||||||||||
| 2010 September Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 | ||||
| 2010 August Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 | ||||
| 2010 April Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 | ||||
| 2010 June Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 | ||||
| 2010 July Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 | ||||
| 2010 May Return | ✔ | ✘ | ✘ | ✘ | ✘ | 0 |
| Resource/Stage | Error | |
| 2010 September Return | ||
| extract | HTML file detected | |
| 2010 August Return | ||
| extract | HTML file detected | |
| 2010 April Return | ||
| extract | HTML file detected | |
| 2010 June Return | ||
| extract | HTML file detected | |
| 2010 July Return | ||
| extract | HTML file detected | |
| 2010 May Return | ||
| extract | HTML file detected |


Country Code
Country
+
IN
India
IN
Maharashtra
IN
GOA
+
SP
Spain
MD
Madrid
+
US
United States of America


"x" "1" "TANAKA,M, CSURI,K, MOLNAR,J AND MOTOHASHI,N, DIVERSE MUTAGENICITY OFMETHYLBENZ[C]ACRIDINES IN THE DIRECT AMES' SALMONELLA MUTAGENICITY ASSAY,ANTICANCER RES. 16(5A):2837-2842, 1996"


Location: Find City
{{citiesFound.count}} cities found matching the query: {{searchQuery}}.
View Current Weather


Ingenious Contraption:
You are unable to fathom the purpose for which the machine was built. You do see what looks like a switch. Would you like to flip it?
Flip the switch.


As you can see, location is changed to "/demo/add" from "/demo", you can execute another MVC's via router. And you can do what you want to. You don't have to replace all the layout, and as you can see you can add some effects to view part.
Please add some person, and lets see the DOM storage.


Home
Important Information
Username:
Password:
Male:
Female:
Grapes:
Apples:
Bananas:
Optional Items
We want to know more about you.
Write a short essay about yourself.
Where are you from?
North America
South America
Europe
Asia
Africa
Australia
Antarctica


--- layout: post status: publish published: true title: Bryant-Baez Flavored Joy - Podcast Episode 6.31 author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 10388 wordpress_url: http://ivyenvy.com/?p=10388 date: '2014-08-24 23:08:47 +0000' date_gmt: '2014-08-25 04:08:47 +0000' categories: - Podcast tags: [] comments: - id: 12444 author: Tadd Swanson author_email: '' author_url: '' date: '2014-08-25 16:37:35 +0000' date_gmt: '2014-08-25 21:37:35 +0000' content: Just finished listening..... In the muscle flexes, you guys started talking about Rick Telander and what a fan you guys are of his work. During the off-season or early spring of this year, I heard him on David Kaplan's Sportstalk Live saying that Cubs weren't going to be good for 20 years. I pretty much had the same thoughts as you guys did.... - id: 12445 author: Michael Cotton author_email: '' author_url: '' date: '2014-08-25 17:11:12 +0000' date_gmt: '2014-08-25 22:11:12 +0000' content: It just goes to show that these "sports writers/announcers/talking heads" actually don't know that much about what is going on. It is so ridiculously obvious when they talk about our teams that we should really just question EVERY SINGLE THING they say or write. ---
Welcome to the 268th of The Ivy Envy Podcast.
Who would have known that the biggest story of the week in Cubs-land would involve the grounds crew? We talk about this situation and use it as an opportunity to talk about the (negative) attention that the Cubs, ownership and the front office receive.
Corey went up to Wrigley for Social Media Night and talks about this event and tells you why you should attend next year.
Edwin Jackson continues his poor performances and has ended up on the disabled list. We talk about how wrong we were in predicting he would play well this year and look at his future...both with the organization and the type of pitcher he could become.
There is about a week of the minor league baseball season left. We use this opportunity to go through the system and look at the playoff chances for Boise, Kane County, Daytona, Tennessee and Iowa.
We answer listener questions, Kurt gives us a scary stat of the week, we pick a winner for this week's photo caption contest and we read a few internet muscle flexes.


16
1 They brought in the ark of God and put it in the middle of the tent that David had set up for it. Then they offered burnt offerings and fellowship offerings before God.
2 When David had finished sacrificing the burnt offering and the fellowship offerings, he blessed the people in the name of Yahweh.
3 He distributed to every Israelite, both to men and women, a loaf of bread, and a piece of meat, and a cake of raisins.
4 David appointed certain Levites to serve before the ark of Yahweh, and to celebrate, thank and praise Yahweh, the God of Israel.
5 These Levites were Asaph the leader, and second to him Zechariah, Jeiel, Shemiramoth, Jehiel, Mattithiah, Eliab, Benaiah, Obed Edom, and Jeiel. These were to play with stringed instruments and with harps. Asaph was to sound the cymbals, sounding loudly.
6 Benaiah and Jahaziel the priests were to blow the horns regularly, before the ark of the covenant of God.
7 Then on that day David first appointed Assaph and his brothers to sing this song of thanksgiving to Yahweh.
8 Give thanks to Yahweh, call on his name;
make known his deeds among the nations.
9 Sing to him, sing praises to him;
speak of all his marvelous deeds.
10 Boast in his holy name;
let the heart of those who seek Yahweh rejoice.
11 Seek Yahweh and his strength;
seek his presence continually.
12 Recall the marvelous things he has done,
his miracles and the decrees from his mouth,
13 you descendants of Israel his servant,
you people of Jacob, his chosen ones.
14 He is Yahweh, our God.
His decrees are on all the earth.
15 Keep his covenant in mind forever,
the word that he commanded for a thousand generations.
16 He calls to mind the covenant that he made with Abraham,
and his oath to Isaac.
17 This is what he confirmed to Jacob as a statute,
and to Israel as an everlasting covenant.
18 He said, "I will give you the land of Canaan
as your share of your inheritance."
19 I said this when you were only few in number,
so very few, and were strangers in the land.
20 They went from nation to nation,
from one kingdom to another.
21 He did not allow anyone to oppress them;
he punished kings for their sakes.
22 he said, "Do not touch my anointed ones,
And do not harm my prophets."
23 Sing to Yahweh, all the earth;
announce his salvation day after day.
24 Declare his glory among the nations,
his marvelous deeds among all the nations.
25 For Yahweh is great and is to be praised greatly,
and he is to be feared above all other gods.
26 For all the gods of the nations are idols,
but it is Yahweh who made the heavens.
27 Splendor and majesty are in his presence.
Strength and joy are in his place.
28 Ascribe to Yahweh, you clans of peoples,
ascribe to Yahweh glory and strength;
29 Ascribe to Yahweh the glory due to his name.
Bring an offering and come before him.
Bow down to Yahweh in his holy splendor.
30 Tremble before him, all the earth.
The world also is established; it cannot be shaken.
31 Let the heavens be glad, and let the earth rejoice;
let them say among the nations, "Yahweh reigns."
32 Let the sea roar, and that which fills it shout with joy.
Let the fields be joyful, and all that is in them.
33 Then let the trees in the forest shout for joy before Yahweh,
for he is coming to judge the earth.
34 Give thanks to Yahweh, for he is good,
for his covenant faithfulness endures forever.
35 And say, "Save us, God of our salvation.
Gather us together and rescue us from the other nations,
so that we may give thanks to your holy name
and glory in your praises."
36 May Yahweh, the God of Israel, be praised
from everlasting to everlasting.
All the people said, "Amen" and praised Yahweh.
37 So David left Asaph and his brothers before the ark of the covenant of Yahweh, to serve continually before the ark, as every day's work required.
38 Obed Edom with those sixty-eight relatives were included. Obed Edom son of Jeduthun, along with Hosah, were to be gatekeepers.
39 Zadok the priest, and his fellow priests were to serve before the tabernacle of Yahweh at the shrine at Gibeon.
40 They were to offer burnt offerings to Yahweh on the altar for burnt offerings continually morning and evening, following all that is written in the law of Yahweh, which he gave as a command to Israel.
41 Heman and Jeduthun were with them, together with the rest who were chosen by name, to give thanks to Yahweh, because his covenant faithfulness endures forever.
42 Heman and Jeduthun were in charge of those who played trumpets, cymbals, and the other instruments for the sacred music. The sons of Jeduthun guarded the gate.
43 Then all the people returned to their homes, and David returned to bless his own household.


Giv2giv.org is an online fundraising platform that allows people to donate, regardless of donation size, to endowments which provide non-profit organizations with a perpetual income stream of unrestricted grants. Donations can be made to existing endowments or a donor can choose to create their own unique endowment to include the variety of causes which they support. Grants are paid to charities on a quarterly basis and charities are allowed to use the funds for any charitable purpose.
Our goals are simple
Benefits to donors:
Benefits to charities:
Giv2giv believes in transparency and has included our key organizational documents below. Additionally you can interact with us and shape our development through our online discussion forum at http://discourse.giv2giv.org/