// (c) 2026 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
syntax = "proto3";

package ansys.api.speos.common.v1;

//////////////
// MESSAGES //
//////////////

// Units used in Speos data
enum Unit {
	watts = 0; // W
	watts_per_square_meters = 1; // W/(m2)
	watts_per_steradians = 2; // W/(sr)
	watts_per_nanometers = 3; // W/(nm)
	watts_per_square_meters_steradians = 4; // W/(m2.sr)
	watts_per_steradians_nanometers = 5; // W/(sr.nm)
	watts_per_square_meters_nanometers = 6; // W/(m2.nm)
	watts_per_square_foot = 7; // W/ft2
	watts_per_square_foot_nanometer = 8; // W/(ft2.nm)
	watts_per_square_centimeter = 9; // W/cm2
	watts_per_square_foot_steradian = 10; // W/(ft2.sr)
	watts_per_square_meter_steradian_nanometer = 11; // W/(m2.sr.nm)
	watts_per_square_foot_steradian_nanometer = 12; // W/(ft2.sr.nm)
	watts_per_cubic_meter = 13; // W/m3
	watts_per_cubic_centimeter = 14; // W/cm3

	joules = 16; // J
	joules_per_nanometers = 17; // J/(nm)
	joules_per_square_meters = 18; // J/(m2)
	joules_per_square_meters_nanometers = 19; // J/(m2.nm)
	joules_per_square_centimeter = 20; // J/cm2
	joules_per_square_foot = 21; // J/ft2
	joules_per_square_foot_nanometer = 22; // J/(ft2.nm)

	luxes = 29; // lx
	luxes_seconds = 30; // lx.s
	luxes_per_nanometers = 31; // lx.s/(nm)
	luxes_seconds_per_nanometers = 32; // lx.s/(nm)

	candelas = 42; // cd
	candelas_per_square_meters = 43; // cd/(m2)
	candelas_per_nanometers = 44; // cd/(m2)
	candelas_per_squaremeters_nanometers = 45; // cd/(m2.nm)
	candelas_per_square_centimeter = 46; // cd/cm2
	candelas_per_square_foot = 47; // cd/ft2
	candelas_per_square_foot_nanometer = 48; // cd/(ft2.nm)

	lumens_per_square_meters_nanometers = 49; // lm/(m2.nm) 
	lumens = 55; // lm
	lumens_seconds = 56; // lm.s
	lumens_per_nanometers = 57; // lm/(nm)
	lumens_per_square_centimeter = 59; // lm/cm2

	percent = 60; // %

	lumens_per_cubic_meter = 61; // lm/m3
	lumens_seconds_per_square_centimeter = 62; // lm.s/cm2

	color_XYZ = 70; // XYZ CIE
	color_xyY = 71; // xy CIE
	color_uvY = 72; // uvY 1960 UCS CIE
	color_uvY_prime = 73; // u'v'Y' 1976 UCS CIE
	color_Luv = 74; // L*u*v CIELUV
	color_Lab = 75; // L*a*b CIELAB
	color_LCh = 76; // L*C*h  CIELAB
	color_rgb = 77; // rgb
	color_rgba = 79; // rgba

	foot_candles = 90; // fc
	foot_candles_per_nanometer = 91; // fc/nm
	foot_candles_seconds = 92; // fc.s
	foot_candles_seconds_per_nanometer = 93; // fc.s/nm
	foot_lamberts = 94; // fL
	foot_lamberts_per_nanometer = 95; // fL/nm

	nanometers = 120; // nm
	micrometers = 121; // um
	millimeters = 122; // mm
	meters = 123; // m
	radians = 124; // rad
	degrees = 125; // deg
	steradians = 126; // sr

	ray_per_pixel = 127; // rays/pixel

	feet = 128; // ft
	inches = 129; // in
	milliradians = 130; // mrad
	arcminutes = 131; // '
	arcseconds = 132; // ''
	kelvin = 133; // K
	diopters = 134; // D
	millidiopters = 135; // mD
	unit_precision = 136; // %

	square_meters = 140; // m2
	square_centimeters = 141; // cm2
	square_millimeters = 142; // mm2
	square_micrometers = 143; // micron2
	square_nanometers = 144; // nm2
	square_feet = 145; // ft2
	square_inches = 146; // inch2

	invert_meter = 150; // m-1
	invert_millimeter = 151; // mm-1
	invert_foot = 152; // ft-1
	invert_inch = 153; // in-1
	invert_steradian = 154; // sr-1

	no_unit = 160; // 
}

// Magnitude represent a physical quantity
enum Magnitude {
	irradiance = 0; // radiometric irradiance 
	illuminance = 1; // photometric irradiance
	spectral_irradiance = 2; // spectral radiometric irradiance
	spectral_illuminance = 3; // spectral photometric irradiance
	radiance = 4; // radiometric radiance
	luminance = 5; // photometric radiance
	spectral_radiance = 6; // spectral radiometric radiance
	spectral_luminance = 7; // spectral photometric radiance
	radiant_intensity = 8; // radiometric intensity
	luminous_intensity = 9; // photometric intensity
	spectral_radiant_intensity = 10; // spectral radiometric intensity
	spectral_luminous_intensity = 11; // spectral photometric intensity
	exposure = 12; // radiometric exposure
	luminous_exposure = 13; // photometric exposure
	spectral_exposure = 14; // spectral radiometric exposure
	spectral_luminous_exposure = 15; // spectral photometric exposure

	radiant_flux = 16; // radiometric flux
	luminous_flux = 17; // photometric flux

	wavelength = 26; // wavelength
	ratio = 27; // magnitude ratio

	color = 37; // color
	ray_sampling = 38; // rays sampling

	distance = 48; // distance
	dimension = 49; // dimension
	plane_angle = 50; // plane angle
	curvature = 51; // curvature
	curvature_product = 52; // curvature product

	photometric_power_density = 62; // photometric power density
	radiometric_power_density = 63; // radiometric power density
	spherical_probability_density = 64; // spherical probability density
	
	temperature_elevation = 74; // temperature elevation

	colorimetric_error = 84; // colorimetric error
	signal_to_noise_ratio = 85; // SNR
	precision = 86; // precision
	relative_standard_error = 87; // relative standard error

	refractive_power = 97; // refractive power
	refractive_index = 98; // refractive index
	absorption = 99; // absorption

	x_color = 109; // xyY color space
	y_color = 110; // xyY color space
	u_color = 111; // uvY color space
	v_color = 112; // uvY color space
	u_prime_color = 113; // u'v'Y color space
	v_prime_color = 114; // u'v'Y color space
	u_star_color = 115; // L*u*v* color space
	v_star_color = 116; // L*u*v* color space
	a_star_color = 117; // L*a*b* color space
	b_star_color = 118; // L*a*b* color space
	uppercase_c_star_color = 119; // L*C*h color space
	h_color = 120; // L*C*h color space
	uppercase_x_color = 121; // XYZ color space
	uppercase_y_color = 122; // XYZ color space
	uppercase_z_color = 123; // XYZ color space
	uppercase_l_star_color = 124; // L*u*v* color space

	glare = 134; // glare
}

// arrays values of doubles
message DataDoubles {
	repeated double values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// arrays values of floats
message DataFloats {
	repeated float values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// arrays values of integers
message DataIntegers64 {
	repeated int64 values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// arrays values of integers
message DataIntegers32 {
	repeated int32 values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// arrays values of integers
message DataUIntegers64 {
	repeated uint64 values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// arrays values of integers
message DataUIntegers32 {
	repeated uint32 values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}

// raw buffer in bytes, to send any kind of data
message DataBytes{
	bytes values = 1; // raw values
	uint64 magnitude_size = 2; // number of values needed to describe the magnitude (ex : simple value=1 / vector=3 / color_rgb=3 ...)
	repeated uint64 dimensions = 3; // size of dimensions where the magnitudes are applied = total number of dimension representation of the data, each value representing its dimension size
	Magnitude magnitude = 4; // magnitude of the value of what we have received
	Unit unit = 5; // units of the values
}