community / community.cip / 1.0.1 / module / generic_message Craft and send a custom "generic" CIP message Authors: Aaron Neustedter (@aaron97neu) preview | supported by communitycommunity.cip.generic_message (1.0.1) — module
Install with ansible-galaxy collection install community.cip:==1.0.1
collections: - name: community.cip version: 1.0.1
A thin abstraction of the pycomm3 generic_message() API call. Connection related arguments are handled by ansible. This is intended for experienced developers needing functionality not already covered by the industrial.logix plugin. The functionality of this module is similar to crafting a TCP packet by hand. Typically, this call uses many builtin constants provided by the pycomm3 package, but in this case raw hex or dec values must be used. The lookup tables used by pycomm3 can be found in the following directory: https://github.com/ottowayi/pycomm3/tree/master/pycomm3/cip
- name: Get MAC address of EN2T device industrial.logix.generic_message: service: 0x0E class_code: 0xF6 instance: 1 attribute: 3 data_type: elementary_type: USINT array_len: 6
- name: Find the IP Setting configuration type. 0b_0000 = 'static', 0b_0001 = 'BOOTP' 0b_0010 = 'DHCP' industrial.logix.generic_message: service: 0x0E class_code: 0xf5 instance: 1 attribute: 3 data_type: elementary_type: INT array_len: -1 name: 'IP_config'
name: default: generic description: - return Tag.Tag value, arbitrary but can be for tracking returned Tags required: false type: str service: description: - service code for the request (single byte) required: true type: str instance: description: - ID for an instance of the class. If set to 0, request class attributes required: true type: str attribute: default: '' description: - attribute ID for the service/class/instance required: false type: str data_type: default: {} description: - dict containing description of the expected return data type required: false suboptions: array_len: default: 1 description: - If the data type if an array, the length of the array. Values less than 2 denote datatype is not an array required: false type: int elementary_type: description: - 'elementary data type, choices described here: https://docs.pycomm3.dev/en/latest/api_reference/data_types.html#pycomm3.cip.data_types.DataTypes' required: true type: str type: dict class_code: description: - request object class ID required: true type: str request_data: default: '' description: - any additional data required for the request required: false type: str