Skip to main content

IesMetadata

Struct IesMetadata 

Source
pub struct IesMetadata {
Show 30 fields pub version: String, pub test_report: String, pub test_lab: String, pub issue_date: String, pub manufacturer: String, pub luminaire_catalog: String, pub lamp_catalog: String, pub ballast: String, pub file_generation_type: String, pub is_accredited: bool, pub is_scaled: bool, pub is_interpolated: bool, pub is_simulation: bool, pub luminous_shape: String, pub luminous_width: f64, pub luminous_length: f64, pub luminous_height: f64, pub is_rectangular: bool, pub is_circular: bool, pub photometric_type: String, pub unit_type: String, pub has_tilt_data: bool, pub tilt_lamp_geometry: i32, pub tilt_angle_count: usize, pub maintenance_category: Option<i32>, pub ballast_factor: f64, pub input_watts: f64, pub num_lamps: i32, pub lumens_per_lamp: f64, pub is_absolute_photometry: bool,
}
Expand description

IES LM-63-19 specific metadata for GLDF integration.

Contains information from IES files that doesn’t map directly to GLDF DescriptivePhotometry but is valuable for data provenance, validation, and geometry definition.

Fields§

§version: String

IES file format version

§test_report: String

Test report number ([TEST] keyword)

§test_lab: String

Photometric testing laboratory ([TESTLAB])

§issue_date: String

Date manufacturer issued the file ([ISSUEDATE])

§manufacturer: String

Manufacturer of luminaire ([MANUFAC])

§luminaire_catalog: String

Luminaire catalog number ([LUMCAT])

§lamp_catalog: String

Lamp catalog number ([LAMPCAT])

§ballast: String

Ballast description ([BALLAST])

§file_generation_type: String

File generation type (LM-63-19 Section 5.13)

§is_accredited: bool

Whether data is from an accredited test lab

§is_scaled: bool

Whether luminous flux values were scaled

§is_interpolated: bool

Whether angle values were interpolated

§is_simulation: bool

Whether data is from computer simulation

§luminous_shape: String

Luminous opening shape (LM-63-19 Table 1)

§luminous_width: f64

Luminous opening width in meters (absolute value, negative in IES = curved)

§luminous_length: f64

Luminous opening length in meters

§luminous_height: f64

Luminous opening height in meters

§is_rectangular: bool

Whether the shape is rectangular (positive dims) or curved (negative dims)

§is_circular: bool

Whether the shape is circular (|width| == |length|, both negative)

§photometric_type: String

Photometric type (A/B/C)

§unit_type: String

Unit type (Feet/Meters)

§has_tilt_data: bool

TILT information present

§tilt_lamp_geometry: i32

Lamp geometry (1-3) if TILT data present

§tilt_angle_count: usize

Number of TILT angle/factor pairs

§maintenance_category: Option<i32>

IES maintenance category (1-6)

§ballast_factor: f64

Ballast factor

§input_watts: f64

Input watts

§num_lamps: i32

Number of lamps

§lumens_per_lamp: f64

Lumens per lamp (-1 = absolute photometry)

§is_absolute_photometry: bool

Is this absolute photometry (lumens = -1)?

Implementations§

Source§

impl IesMetadata

Source

pub fn from_ies_data(ies: &IesData) -> Self

Create IesMetadata from parsed IesData.

Source

pub fn to_gldf_properties(&self) -> Vec<(&'static str, String)>

Export as key-value pairs for GLDF integration.

Source

pub fn to_gldf_emitter_geometry(&self) -> (&'static str, i32, i32, i32)

Get GLDF-compatible emitter geometry info.

Returns (shape_type, width_mm, length_mm, diameter_mm) for GLDF SimpleGeometry.

Trait Implementations§

Source§

impl Clone for IesMetadata

Source§

fn clone(&self) -> IesMetadata

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IesMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IesMetadata

Source§

fn default() -> IesMetadata

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.