version_info_utility.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # @file version_info_utility.cc
4 #
5 # Copyright 2013-2025
6 # Carnegie Robotics, LLC
7 # 4501 Hatfield Street, Pittsburgh, PA 15201
8 # http://www.carnegierobotics.com
9 #
10 # All rights reserved.
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions are met:
14 # * Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
16 # * Redistributions in binary form must reproduce the above copyright
17 # notice, this list of conditions and the following disclaimer in the
18 # documentation and/or other materials provided with the distribution.
19 # * Neither the name of the Carnegie Robotics, LLC nor the
20 # names of its contributors may be used to endorse or promote products
21 # derived from this software without specific prior written permission.
22 #
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 # DISCLAIMED. IN NO EVENT SHALL CARNEGIE ROBOTICS, LLC BE LIABLE FOR ANY
27 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #
34 # Significant history (date, user, job code, action):
35 # 2025-02-07, malvarado@carnegierobotics.com, IRAD, Created file.
36 #
37 
38 import argparse
39 
40 import libmultisense as lms
41 
42 def main(args):
43  channel_config = lms.ChannelConfig()
44  channel_config.ip_address = args.ip_address
45  channel_config.mtu = args.mtu
46 
47  with lms.Channel.create(channel_config) as channel:
48  if not channel:
49  print("Invalid channel")
50  exit(1)
51 
52  info = channel.get_info();
53 
54  print("Firmware build date : ", info.version.firmware_build_date)
55  print("Firmware version : ", info.version.firmware_version.to_string())
56  print("Hardware version : ", hex(info.version.hardware_version))
57 
58 if __name__ == '__main__':
59  parser = argparse.ArgumentParser("LibMultiSense save image utility")
60  parser.add_argument("-a", "--ip_address", default="10.66.171.21", help="The IPv4 address of the MultiSense.")
61  parser.add_argument("-m", "--mtu", type=int, default=1500, help="The MTU to use to communicate with the camera.")
62  main(parser.parse_args())
version_info_utility.main
def main(args)
Definition: version_info_utility.py:42


multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:09