AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/demo/object/lo.c
float Lighting_Output_Present_Value(
    uint32_t object_instance)
{
    float value = 0.0;
    unsigned index = 0;
    unsigned p = 0;

    index = Lighting_Output_Instance_To_Index(object_instance);
    if (index < MAX_LIGHTING_OUTPUTS) {
        value = Lighting_Output[index].Relinquish_Default;
        for (p = 0; p < BACNET_MAX_PRIORITY; p++) {
            if (BIT_CHECK(Lighting_Output[index].Priority_Active_Bits, p)) {
                value = Lighting_Output[index].Priority_Array[p];
                break;
            }
        }
    }

    return value;
}
/**
 * For a given object instance-number, determines the present-value
 *
 * @param  object_instance - object-instance number of the object
 *
 * @return  present-value of the object
 */
For a given object instance-number, determines the present-value
@param  object_instance - object-instance number of the object

@return  present-value of the object
For a given object instance - number determines the present - value @param object_instance - object - instance number of the object @return present - value of the object
float Lighting_Output_Present_Value(
    uint32_t object_instance)
{
    float value = 0.0;
    unsigned index = 0;
    unsigned p = 0;
    index = Lighting_Output_Instance_To_Index(object_instance);
    if (index < MAX_LIGHTING_OUTPUTS) {
        value = Lighting_Output[index].Relinquish_Default;
        for (p = 0; p < BACNET_MAX_PRIORITY; p++) {
            if (BIT_CHECK(Lighting_Output[index].Priority_Active_Bits, p)) {
                value = Lighting_Output[index].Priority_Array[p];
                break;
            }
        }
    }
    return value;
}
float Lighting_Output_Present_Value ( uint32_t object_instance ) { float value = 0.0 ; unsigned index = 0 ; unsigned p = 0 ; index = Lighting_Output_Instance_To_Index ( object_instance ) ; if ( index < MAX_LIGHTING_OUTPUTS ) { value = Lighting_Output [ index ] . Relinquish_Default ; for ( p = 0 ; p < BACNET_MAX_PRIORITY ; p ++ ) { if ( BIT_CHECK ( Lighting_Output [ index ] . Priority_Active_Bits , p ) ) { value = Lighting_Output [ index ] . Priority_Array [ p ] ; break ; } } } return value ; }
For a given object instance-number, determines the present-value
 @param  object_instance - object-instance number of the object
For a given object instance - number determines the present - value @param object_instance - object - instance number of the object