//****************************************************************************
// File:        LQW43FT_0H.ael (create_item_L.ael)
// Description: component definition file
// Author:      Keysight Technologies Japan, Ltd. 
// Created:     2026.06.26 08:11:58
// Language:    AEL
// (C) Copyright 2004-2016, Keysight Technologies Japan G.K. , all rights reserved.
//****************************************************************************


// Item definition /////////////////////////////////////////////////
set_simulator_type(-1);
create_item
(
	"LQW43FT_0H"	//name//
	,"RF Inductor"		//label//
	,"L"		//prefix//
	,ITEM_BOM_ITEM		//attribute//
	,-1					//priority//
	,NULL               //iconName//
	,"Component Parameters"  //dialogName//
	,""                      //dialogData//
	,ComponentNetlistFmt      //netlistformat// CmpModelNetlistFmt or ComponentNetlistFmt
	,"LQW43FT_0H"            //netlistData//
	,ComponentAnnotFmt       //displayFormat//
	,"SYM_L"    //symbolName(Obsolete)//
	,2                               //artworkType,0 = no artwork,1 = fixed artwork,2 = ael generated artwork(Obsolete)//
	,"muRataLibWeb_LQW43FT_0H_draw_artwork"  //artworkData, For fixed artwork,a layout artwork design name, For macro artwork, an AEL artwork generation function (Obsolete)// 
	,ITEM_PRIMITIVE_EX                //extraAttribute//
////////////////////////////////////////////////////////////////////

// Parmameter definition ///////////////////////////////////////////
	,create_parm
	(
		"PartNumber"
		,"Component Part Number"
		,PARM_STRING
		,"LQW43FT_0H_list_opt"
		,STRING_UNIT
		,prm("NULL","NULL")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "PartNumber", TRUE))
	)
	,create_parm
	(
		"Type"
		,"Type or Use"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm","")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "Type", TRUE))
	)
	,create_parm
	(
		"Size"
		,"Size Code"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED | PARM_NOT_EDITED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm", "\"4532[mm]/1812[inch]\"")
	)
	,create_parm
	(
		"Value"
		,"Inductance"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm","")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "Value", TRUE))
	)
	,create_parm
	(
		"Tolerance"
		,"Tolerance"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm","")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "Tolerance", TRUE))
	)
	,create_parm
	(
		"Dimensions"
		,"LxWxH"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED | PARM_NOT_EDITED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm", "\"4.5x3.2[mm]\"")
	)
	,create_parm
	(
		"RatedCurrent"
		,"Rated Current"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm","")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "RatedCurrent", TRUE))
	)
	,create_parm
	(
		"FreqRange"
		,"Frequency Range"
		,PARM_STRING | PARM_NO_DISPLAY | PARM_NOT_NETLISTED
		,"StdFormSet"
		,STRING_UNIT
		,prm("StdForm","")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_L_paramType_L_cb", "FreqRange", TRUE))
	)
	// for artwork 
	,create_parm
	(
		"LandWidth"
		,"Width of the land ( 3.2 mm < LandWidth < 3.2 mm )"
		,PARM_NOT_NETLISTED|PARM_NO_DISPLAY
		,"StdFormSet"
		,LENGTH_UNIT
		,prm("StdForm","3.2 mm")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_LQW43FT_0H_lay_cb", "LandWidth", TRUE))
	)
	,create_parm
	(
		"LandLength"
		,"Length of the land ( 0.98 mm < LandLength < 0.98 mm )"
		,PARM_NOT_NETLISTED|PARM_NO_DISPLAY
		,"StdFormSet"
		,LENGTH_UNIT
		,prm("StdForm","0.98 mm")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_LQW43FT_0H_lay_cb", "LandLength", TRUE))

	)
	,create_parm
	(
		"LandSpace"
		,"Space of the land ( 2.94 mm < LandSpace < 2.94 mm )"
		,PARM_NOT_NETLISTED|PARM_NO_DISPLAY
		,"StdFormSet"
		,LENGTH_UNIT
		,prm("StdForm","2.94 mm")
		,list(dm_create_cb(PARM_MODIFIED_CB, "muRataLibWeb_LQW43FT_0H_lay_cb", "LandSpace", TRUE))

	)
	,create_parm
	(
		"LandLayer"
		,"Layer of the pad"
		,PARM_NOT_NETLISTED|PARM_NO_DISPLAY
		,"smt_pad_layer"
		,UNITLESS_UNIT
//		,prm("layer_text_form","\"bond\"")
		,prm("layer_text_form","\"bond:drawing\"")
	)
);

////////////////////////////////////////////////////////////////////
// Callback function
////////////////////////////////////////////////////////////////////

defun muRataLibWeb_LQW43FT_0H_lay_cb(cbP, clientData, callData)
{
	decl dependentParmData=NULL;


	//get parameter value
	decl LandWidth  = pcb_get_mks(callData, "LandWidth");
	decl LandLength = pcb_get_mks(callData, "LandLength");
	decl LandSpace  = pcb_get_mks(callData, "LandSpace");

	decl LandWidth_MIN  = 3.2 mm;
	decl LandLength_MIN = 0.98 mm;
	decl LandSpace_MIN  = 2.94 mm;

	decl LandWidth_MAX  = 3.2 mm;
	decl LandLength_MAX = 0.98 mm;
	decl LandSpace_MAX  = 2.94 mm;

	// check value range ---
	if(LandWidth < LandWidth_MIN )
		LandWidth = LandWidth_MIN;
	elseif(LandWidth > LandWidth_MAX )
		LandWidth = LandWidth_MAX;

	// check value range ---
	if(LandLength < LandLength_MIN )
		LandLength = LandLength_MIN;
	elseif(LandLength > LandLength_MAX )
		LandLength = LandLength_MAX;

	// check value range ---
	if(LandSpace < LandSpace_MIN )
		LandSpace = LandSpace_MIN;
	elseif(LandSpace > LandSpace_MAX )
		LandSpace = LandSpace_MAX;

	// Return the values ////
	dependentParmData = pcb_set_mks(dependentParmData, "LandWidth"  ,LandWidth);
	dependentParmData = pcb_set_mks(dependentParmData, "LandLength" ,LandLength);
	dependentParmData = pcb_set_mks(dependentParmData, "LandSpace"  ,LandSpace);
	return dependentParmData;


}


////////////////////////////////////////////////////////////////////
// Artwork data
////////////////////////////////////////////////////////////////////


defun muRataLibWeb_LQW43FT_0H_draw_artwork(
//	PartNumber,
//	Type,
//	Size,
//	TempCharacteristics,
//	Value,
//	Tolerance,
//	Dimensions,
//	RatedVoltage,
//	FreqRange,
	PartNumber,
	Type,
	Size,
	Value,
	Tolerance,
	Dimensions,
	RatedCurrent,
	FreqRange,
	LandWidth,
	LandLength,
	LandSpace,
	LandLayer
)
{
	// artwork ...  ./circuit/artwork/layout.ael
	muRataLibWeb_basic_CL_draw_artwork(
		Dimensions,
		LandWidth,
		LandLength,
		LandSpace,
		LandLayer );
		
}

