@kvaser/canking-api
Version:
CanKing API to communicate with the CanKing service using Node.js.
45 lines (44 loc) • 1.96 kB
TypeScript
/**
* This module includes UI control for selecting a LIN master channel from the current measurement setup.
*
* To be able to use these controls the CanKingDataProvider component must be present in the
* component tree above your component. Normally the CanKingDataProvider is added
* at the root of the component tree.
*
* @packageDocumentation
*/
import { JSX } from 'react';
/**
* Properties of the LinChannelSelectControl React component.
*/
export interface LinChannelSelectControlProps {
/** Identifier of the selected channel. */
channelIdentifier: string;
/** If true, master channels will be selected and otherwise slave channels. */
selectMasterChannels: boolean;
/**
* Callback that will be called when a new channel has been selected.
* @param identifier - The new channel identifier.
*/
onChannelIdentifierChange: (identifier: string) => void;
/** Set to true if this control shouldn't be encapsulated inside a SectionControl. */
hideSectionControl?: boolean;
/** Set to true to disable this control. */
disabled?: boolean;
/** Set to true if the SectionControl should be collapsible, ignored if hideSectionControl is true. */
collapsible?: boolean;
/** Current collapse state of the SectionControl. */
collapsed?: boolean;
/**
* Callback that will be called when collapse state has changed.
* @param value - The new collapse state.
*/
collapsedChange?: (value: boolean) => void;
}
/**
* Creates an UI control for selecting a LIN channel from the current measurement setup.
* @param props - Component properties.
* @returns The LinChannelSelectControl React component.
*/
declare function LinChannelSelectControl({ channelIdentifier, selectMasterChannels, onChannelIdentifierChange, hideSectionControl, disabled, collapsible, collapsed, collapsedChange, }: LinChannelSelectControlProps): JSX.Element;
export default LinChannelSelectControl;