// (c) 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited. ANSYS Confidential Information
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)

	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)

	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)

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

	percent = 60; // %

	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

	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
}

// magnitudes in Speos data
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

	ratio = 27; // magnitude ratio

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

// 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
}