COSNOTIFICATION_QOSADMIN(3erl)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

CosNotification_QoSAdmin πŸ’– (that's the Erlang module name btw, and yeah this is the 3erl manual page for it)

okay bestie sit DOWN because we're doing QoS admin today and honestly? it's giving ✨ infrastructure ✨. This whole page is literally just: how do you peek at, change, and vibe-check the Quality of Service settings on a notification object. That's it. That's the page. Let's go πŸ¦‹


NAME πŸŽ€

CosNotification_QoSAdmin β€” this module implements the OMG CosNotification::QoSAdmin interface. periodt.


DESCRIPTION 🌸

So first thing first, if you wanna get access to the record definitions for the structures, you're gonna need this little include, no cap:

-include_lib("cosNotification/include/*.hrl").

And the big lore here: all objects, which inherit this interface, export functions described in this module. So like, if an object has this interface, it's got these functions. every single one of them. iconic behavior honestly πŸ’…


EXPORTS ✨

get_qos(Object) -> Reply πŸ”

Types:

Object = #objref
Reply = [QoSProperty]
QoSProperty = #'CosNotification_Property'{name, value}
name = string()
value = #any

This one is the lil peek-behind-the-curtain operation. You call it, and it hands you back a list of name-value pairs that wraps up the current QoS settings for the target object. Like a little status report bestie 🫢


set_qos(Object, QoS) -> Reply πŸ’…

Types:

Object = #objref
QoS = [QoSProperty]
QoSProperty = #'CosNotification_Property'{name, value}
name = string()
value = #any
Reply = ok | {'EXCEPTION',
#'CosNotification_UnsupportedQoS'{qos_err}}
qos_err = PropertyErrorSeq
PropertyErrorSeq = [PropertyError]
PropertyError = #'CosNotification_PropertyError'{code, name,
available_range}
code = 'UNSUPPORTED_PROPERTY' | 'UNAVAILABLE_PROPERTY' |
'UNSUPPORTED_VALUE' | 'UNAVAILABLE_VALUE' | 'BAD_PROPERTY' |
'BAD_TYPE' | 'BAD_VALUE'
name = string()
available_range = PropertyRange
PropertyRange = #CosNotification_PropertyRange{low_val,
high_val}
low_val = high_val = #any

Wanna actually change the QoS settings on the target object? Then this is the function, bestie, no other way around it. But listen πŸ‘€ β€” if it's not possible to set the requested QoS, the UnsupportedQoS exception gets raised. And she's not coming empty-handed either: she brings a whole sequence of PropertyError's describing which QoS, the possible range, and why it's not allowed. Very thorough of her honestly, we love an explanatory queen πŸ‘‘


validate_qos(Object, QoS) -> Reply 🧚

Types:

Object = #objref
QoS = [QoSProperty]
QoSProperty = #'Property'{name, value}
name = string()
value = #any
Reply = {ok, NamedPropertyRangeSeq} | {'EXCEPTION',
CosNotification_UnsupportedQoS{}}
NamedPropertyRangeSeq = [NamedPropertyRange]
NamedPropertyRange = #CosNotification_NamedPropertyRange{name,
range}
name = string()
range = #CosNotification_PropertyRange{low_val, high_val}
low_val = #any
high_val = #any

The whole point of this operation is basically a vibe check: is this QoS setting supported by the target object or not? And if it is supported β€” plot twist β€” the operation also returns additional properties that you could optionally add as well. So it's like, "yes bestie you're valid, and also here's some extra stuff you might wanna try" 🌈

note that validate_qos uses #'Property'{name, value} while the other two use #'CosNotification_Property'{name, value} β€” keep that in mind, don't come for me, that's literally what it says fr fr 😭

and that's the whole page!! you now know how to get, set, and validate QoS like a main character. slay πŸ’–

β€” a lil sign-off from Ericsson AB, this is cosNotification version 5.2.2, page CosNotification_QoSAdmin(3). go be great out there πŸ¦‹βœ¨

πŸ“¦ where this page comes from