docs: def set_channel_access(self, channel=None,
                             access_update_mode='non_volatile',
                             alerting=False, per_msg_auth=False,
                             user_level_auth=False, access_mode='always',
                             privilege_update_mode='non_volatile',
                             privilege_level='administrator'):
          """Set channel access
  
          :param channel: number [1:7]
  
          :param access_update_mode:
              dont_change  = don't set or change Channel Access
              non_volatile = set non-volatile Channel Access
              volatile     = set volatile (active) setting of Channel Access
  
          :param alerting: PEF Alerting Enable/Disable
          True  = enable PEF Alerting
          False = disable PEF Alerting on this channel
                  (Alert Immediate command can still be used to generate alerts)
  
          :param per_msg_auth: Per-message Authentication
          True  = enable
          False = disable Per-message Authentication. [Authentication required to
                  activate any session on this channel, but authentication not
                  used on subsequent packets for the session.]
  
          :param user_level_auth: User Level Authentication Enable/Disable.
          True  = enable User Level Authentication. All User Level commands are
              to be authenticated per the Authentication Type that was
              negotiated when the session was activated.
          False = disable User Level Authentication. Allow User Level commands to
              be executed without being authenticated.
              If the option to disable User Level Command authentication is
              accepted, the BMC will accept packets with Authentication Type
              set to None if they contain user level commands.
              For outgoing packets, the BMC returns responses with the same
              Authentication Type that was used for the request.
  
          :param access_mode: Access Mode for IPMI messaging
          (PEF Alerting is enabled/disabled separately from IPMI messaging)
          disabled = disabled for IPMI messaging
          pre_boot = pre-boot only channel only available when system is in a
                  powered down state or in BIOS prior to start of boot.
          always   = channel always available regardless of system mode.
                  BIOS typically dedicates the serial connection to the BMC.
          shared   = same as always available, but BIOS typically leaves the
                  serial port available for software use.
  
          :param privilege_update_mode: Channel Privilege Level Limit.
              This value sets the maximum privilege level
              that can be accepted on the specified channel.
              dont_change  = don't set or change channel Privilege Level Limit
              non_volatile = non-volatile Privilege Level Limit according
              volatile     = volatile setting of Privilege Level Limit
  
          :param privilege_level: Channel Privilege Level Limit
              * reserved      = unused
              * callback
              * user
              * operator
              * administrator
              * proprietary   = used by OEM
          """
          if channel is None:
              channel = self.get_network_channel()
          data = []
          data.append(channel & 0b00001111)
          access_update_modes = {
              'dont_change': 0,
              'non_volatile': 1,
              'volatile': 2,
              # 'reserved': 3
          }
          b = 0
          b |= (access_update_modes[access_update_mode] << 6) & 0b11000000
          if alerting:
              b |= 0b00100000
          if per_msg_auth:
              b |= 0b00010000
          if user_level_auth:
              b |= 0b00001000
          access_modes = {
              'disabled': 0,
              'pre_boot': 1,
              'always': 2,
              'shared': 3,
          }
          b |= access_modes[access_mode] & 0b00000111
          data.append(b)
          b = 0
          privilege_update_modes = {
              'dont_change': 0,
              'non_volatile': 1,
              'volatile': 2,
              # 'reserved': 3
          }
          b |= (privilege_update_modes[privilege_update_mode] << 6) & 0b11000000
          privilege_levels = {
              'reserved': 0,
              'callback': 1,
              'user': 2,
              'operator': 3,
              'administrator': 4,
              'proprietary': 5,
              # 'no_access': 0x0F,
          }
          b |= privilege_levels[privilege_level] & 0b00000111
          data.append(b)
          response = self.raw_command(netfn=0x06, command=0x40, data=data)
          if 'error' in response:
              raise Exception(response['error'])
          return True