mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/base/TestRemoteObservationListener.java
private ObservationGen.Observation createProtoObservation()
    {
        //uuid to use for the observation
        UUID obsUuid = UUID.randomUUID();
        SharedMessages.UUID obsUuidMsg = SharedMessages.UUID.newBuilder().
            setLeastSignificantBits(obsUuid.getLeastSignificantBits()).
            setMostSignificantBits(obsUuid.getMostSignificantBits()).build();
        UUID assetUuid = UUID.randomUUID();
        SharedMessages.UUID assetUuidMsg = SharedMessages.UUID.newBuilder().
            setLeastSignificantBits(assetUuid.getLeastSignificantBits()).
            setMostSignificantBits(assetUuid.getMostSignificantBits()).build();

        //observation message
        return ObservationGen.Observation.newBuilder().
            setAssetUuid(assetUuidMsg).
            setAssetName("I am an Asset").
            setAssetType("those.super.AmazingAsset").
            setCreatedTimestamp(Calendar.getInstance().getTimeInMillis()).
            setSystemInTestMode(true).
            setSystemId(321).
            setVersion(Version.newBuilder().setMajorNumber(1).setMinorNumber(2).build()).
            setUuid(obsUuidMsg).build();
    }
/**
    * Create an new proto observation.
    */
Create an new proto observation.
Create an new proto observation .
private ObservationGen.Observation createProtoObservation()
    {
        UUID obsUuid = UUID.randomUUID();
        SharedMessages.UUID obsUuidMsg = SharedMessages.UUID.newBuilder().
            setLeastSignificantBits(obsUuid.getLeastSignificantBits()).
            setMostSignificantBits(obsUuid.getMostSignificantBits()).build();
        UUID assetUuid = UUID.randomUUID();
        SharedMessages.UUID assetUuidMsg = SharedMessages.UUID.newBuilder().
            setLeastSignificantBits(assetUuid.getLeastSignificantBits()).
            setMostSignificantBits(assetUuid.getMostSignificantBits()).build();
        return ObservationGen.Observation.newBuilder().
            setAssetUuid(assetUuidMsg).
            setAssetName("I am an Asset").
            setAssetType("those.super.AmazingAsset").
            setCreatedTimestamp(Calendar.getInstance().getTimeInMillis()).
            setSystemInTestMode(true).
            setSystemId(321).
            setVersion(Version.newBuilder().setMajorNumber(1).setMinorNumber(2).build()).
            setUuid(obsUuidMsg).build();
    }
private ObservationGen . Observation createProtoObservation ( ) { UUID obsUuid = UUID . randomUUID ( ) ; SharedMessages . UUID obsUuidMsg = SharedMessages . UUID . newBuilder ( ) . setLeastSignificantBits ( obsUuid . getLeastSignificantBits ( ) ) . setMostSignificantBits ( obsUuid . getMostSignificantBits ( ) ) . build ( ) ; UUID assetUuid = UUID . randomUUID ( ) ; SharedMessages . UUID assetUuidMsg = SharedMessages . UUID . newBuilder ( ) . setLeastSignificantBits ( assetUuid . getLeastSignificantBits ( ) ) . setMostSignificantBits ( assetUuid . getMostSignificantBits ( ) ) . build ( ) ; return ObservationGen . Observation . newBuilder ( ) . setAssetUuid ( assetUuidMsg ) . setAssetName ( "I am an Asset" ) . setAssetType ( "those.super.AmazingAsset" ) . setCreatedTimestamp ( Calendar . getInstance ( ) . getTimeInMillis ( ) ) . setSystemInTestMode ( true ) . setSystemId ( 321 ) . setVersion ( Version . newBuilder ( ) . setMajorNumber ( 1 ) . setMinorNumber ( 2 ) . build ( ) ) . setUuid ( obsUuidMsg ) . build ( ) ; }
Create an new proto observation.
Create an new proto observation .
//uuid to use for the observation //observation message