Class: VendorSpecificAVP
Overview
A vendor-specific AVP.
Constant Summary
Constant Summary
Constants included from AVPType
AVPType::GROUPED, AVPType::IPADDR, AVPType::OCTETSTRING, AVPType::U32
Data getters/setters for different AVP types (collapse)
-
- (Object) vendor_id
readonly
Returns the value of attribute vendor_id.
Attributes inherited from AVP
Data getters/setters for different AVP types (collapse)
- - (VendorSpecificAVP) initialize(code, vendor_id, options = {}) constructor
- - (Object) to_wire
- - (Boolean) vendor_specific?
Methods inherited from AVP
create, #float32, #float32=, #float64, #float64=, #grouped_value, #grouped_value=, #inner_avp, #inner_avps, #int32, #int32=, #int64, #int64=, #ip_address, #ip_address=, #octet_string, #octet_string=, #to_s, #uint32, #uint32=, #uint64, #uint64=
Methods included from AVPParser
mandatory_bit, parse_avps_int, vendor_id_bit
Constructor Details
- (VendorSpecificAVP) initialize(code, vendor_id, options = {})
400 401 402 403 |
# File 'lib/diameter/avp.rb', line 400 def initialize(code, vendor_id, = {}) @vendor_id = vendor_id super(code, ) end |
Instance Attribute Details
- (Object) vendor_id (readonly)
Returns the value of attribute vendor_id
395 396 397 |
# File 'lib/diameter/avp.rb', line 395 def vendor_id @vendor_id end |
Instance Method Details
- (Object) to_wire
411 412 413 414 415 416 |
# File 'lib/diameter/avp.rb', line 411 def to_wire length_8, length_16 = UInt24.to_u8_and_u16(@content.length + 12) avp_flags = @mandatory ? '11000000' : '10000000' header = [@code, avp_flags, length_8, length_16, @vendor_id].pack('NB8CnN') header + self.padded_content end |
- (Boolean) vendor_specific?
406 407 408 |
# File 'lib/diameter/avp.rb', line 406 def vendor_specific? true end |